mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use fresh variables
This commit is contained in:
parent
19913a28d1
commit
1c5b46b981
1 changed files with 3 additions and 3 deletions
|
@ -23,9 +23,9 @@ module Spectator::DSL
|
||||||
# Where the actual value is returned by the system-under-test,
|
# Where the actual value is returned by the system-under-test,
|
||||||
# and the expected value is what the actual value should be to satisfy the condition.
|
# and the expected value is what the actual value should be to satisfy the condition.
|
||||||
macro expect(actual, _source_file = __FILE__, _source_line = __LINE__)
|
macro expect(actual, _source_file = __FILE__, _source_line = __LINE__)
|
||||||
test_value = ::Spectator::TestValue.new({{actual}}, {{actual.stringify}})
|
%test_value = ::Spectator::TestValue.new({{actual}}, {{actual.stringify}})
|
||||||
source = ::Spectator::Source.new({{_source_file}}, {{_source_line}})
|
%source = ::Spectator::Source.new({{_source_file}}, {{_source_line}})
|
||||||
::Spectator::Expectations::ExpectationPartial.new(test_value, source)
|
::Spectator::Expectations::ExpectationPartial.new(%test_value, %source)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Starts an expectation on a block of code.
|
# Starts an expectation on a block of code.
|
||||||
|
|
Loading…
Reference in a new issue