mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Update specs to use new source arguments
Used `new_partial` where the underlying partial didn't matter for the test.
This commit is contained in:
parent
ac5c2bbe47
commit
1507a447c8
25 changed files with 439 additions and 439 deletions
|
@ -7,7 +7,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
it "is true" do
|
||||
hash = Hash{"foo" => "bar"}
|
||||
key = "foo"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(hash)
|
||||
partial = new_partial(hash)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.match?(partial).should be_true
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
it "is false" do
|
||||
hash = Hash{"foo" => "bar"}
|
||||
key = "baz"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(hash)
|
||||
partial = new_partial(hash)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.match?(partial).should be_false
|
||||
end
|
||||
|
@ -29,7 +29,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
it "is true" do
|
||||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(tuple)
|
||||
partial = new_partial(tuple)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.match?(partial).should be_true
|
||||
end
|
||||
|
@ -39,7 +39,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
it "is false" do
|
||||
tuple = {foo: "bar"}
|
||||
key = :baz
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(tuple)
|
||||
partial = new_partial(tuple)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.match?(partial).should be_false
|
||||
end
|
||||
|
@ -52,7 +52,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
label = "blah"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(label, tuple)
|
||||
partial = new_partial(tuple, label)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.message(partial).should contain(label)
|
||||
end
|
||||
|
@ -61,7 +61,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
label = "blah"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(tuple)
|
||||
partial = new_partial(tuple)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(label, key)
|
||||
matcher.message(partial).should contain(label)
|
||||
end
|
||||
|
@ -70,7 +70,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
it "contains the stringified key" do
|
||||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(tuple)
|
||||
partial = new_partial(tuple)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.message(partial).should contain(key.to_s)
|
||||
end
|
||||
|
@ -82,7 +82,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
label = "blah"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(label, tuple)
|
||||
partial = new_partial(tuple, label)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.negated_message(partial).should contain(label)
|
||||
end
|
||||
|
@ -91,7 +91,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
label = "blah"
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(tuple)
|
||||
partial = new_partial(tuple)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(label, key)
|
||||
matcher.negated_message(partial).should contain(label)
|
||||
end
|
||||
|
@ -100,7 +100,7 @@ describe Spectator::Matchers::HaveKeyMatcher do
|
|||
it "contains the stringified key" do
|
||||
tuple = {foo: "bar"}
|
||||
key = :foo
|
||||
partial = Spectator::Expectations::ValueExpectationPartial.new(tuple)
|
||||
partial = new_partial(tuple)
|
||||
matcher = Spectator::Matchers::HaveKeyMatcher.new(key)
|
||||
matcher.negated_message(partial).should contain(key.to_s)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue