mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Fix fallout from last commit in Expectation spec
All tests pass in this commit!
This commit is contained in:
parent
e6ce54202d
commit
b4af87f903
1 changed files with 20 additions and 20 deletions
|
@ -8,8 +8,8 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value.to_s, value)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_true # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, false)
|
||||
matcher.match?(partial).should be_true # Sanity check.
|
||||
expectation.satisfied?.should be_true
|
||||
end
|
||||
|
||||
|
@ -19,8 +19,8 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value.to_s, value)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_true # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, true)
|
||||
matcher.match?(partial).should be_true # Sanity check.
|
||||
expectation.satisfied?.should be_false
|
||||
end
|
||||
end
|
||||
|
@ -33,8 +33,8 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value1)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value2.to_s, value2)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_false # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, false)
|
||||
matcher.match?(partial).should be_false # Sanity check.
|
||||
expectation.satisfied?.should be_false
|
||||
end
|
||||
|
||||
|
@ -45,8 +45,8 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value1)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value2.to_s, value2)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_false # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, true)
|
||||
matcher.match?(partial).should be_false # Sanity check.
|
||||
expectation.satisfied?.should be_true
|
||||
end
|
||||
end
|
||||
|
@ -60,9 +60,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value.to_s, value)
|
||||
match_data = matcher.match(partial)
|
||||
match_data.matched?.should be_true # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, false)
|
||||
matcher.match?(partial).should be_true # Sanity check.
|
||||
expectation.actual_message.should eq(matcher.message(partial))
|
||||
expectation.actual_message.should eq(match_data.message)
|
||||
end
|
||||
|
||||
context "when negated" do
|
||||
|
@ -71,9 +71,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value.to_s, value)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_true # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, true)
|
||||
matcher.match?(partial).should be_true # Sanity check.
|
||||
expectation.actual_message.should eq(matcher.negated_message(partial))
|
||||
expectation.actual_message.should eq(match_data.negated_message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -85,9 +85,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value1)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value2.to_s, value2)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_false # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, false)
|
||||
matcher.match?(partial).should be_false # Sanity check.
|
||||
expectation.actual_message.should eq(matcher.negated_message(partial))
|
||||
expectation.actual_message.should eq(match_data.negated_message)
|
||||
end
|
||||
|
||||
context "when negated" do
|
||||
|
@ -97,9 +97,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value1)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value2.to_s, value2)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_false # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, true)
|
||||
matcher.match?(partial).should be_false # Sanity check.
|
||||
expectation.actual_message.should eq(matcher.message(partial))
|
||||
expectation.actual_message.should eq(match_data.message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -112,9 +112,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value.to_s, value)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_true # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, false)
|
||||
matcher.match?(partial).should be_true # Sanity check.
|
||||
expectation.expected_message.should eq(matcher.message(partial))
|
||||
expectation.expected_message.should eq(match_data.message)
|
||||
end
|
||||
|
||||
context "when negated" do
|
||||
|
@ -123,9 +123,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value.to_s, value)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_true # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, true)
|
||||
matcher.match?(partial).should be_true # Sanity check.
|
||||
expectation.expected_message.should eq(matcher.negated_message(partial))
|
||||
expectation.expected_message.should eq(match_data.negated_message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -137,9 +137,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value1)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value2.to_s, value2)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_false # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, false)
|
||||
matcher.match?(partial).should be_false # Sanity check.
|
||||
expectation.expected_message.should eq(matcher.message(partial))
|
||||
expectation.expected_message.should eq(match_data.message)
|
||||
end
|
||||
|
||||
context "when negated" do
|
||||
|
@ -149,9 +149,9 @@ describe Spectator::Expectations::Expectation do
|
|||
partial = new_partial(value1)
|
||||
matcher = Spectator::Matchers::EqualityMatcher.new(value2.to_s, value2)
|
||||
match_data = matcher.match(partial)
|
||||
matcher.match(partial).matched?.should be_false # Sanity check.
|
||||
expectation = Spectator::Expectations::Expectation.new(match_data, true)
|
||||
matcher.match?(partial).should be_false # Sanity check.
|
||||
expectation.expected_message.should eq(matcher.negated_message(partial))
|
||||
expectation.expected_message.should eq(match_data.negated_message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue