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:
Michael Miller 2019-02-14 17:04:59 -07:00
parent ac5c2bbe47
commit 1507a447c8
25 changed files with 439 additions and 439 deletions

View file

@ -4,7 +4,7 @@ describe Spectator::Matchers::RegexMatcher do
describe "#match?" do
it "compares using #=~" do
spy = SpySUT.new
partial = Spectator::Expectations::ValueExpectationPartial.new(spy)
partial = new_partial(spy)
matcher = Spectator::Matchers::RegexMatcher.new(/foobar/)
matcher.match?(partial).should be_true
spy.match_call_count.should be > 0
@ -14,7 +14,7 @@ describe Spectator::Matchers::RegexMatcher do
it "is true" do
value = "foobar"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.match?(partial).should be_true
end
@ -24,7 +24,7 @@ describe Spectator::Matchers::RegexMatcher do
it "is false" do
value = "foo"
pattern = /bar/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.match?(partial).should be_false
end
@ -35,7 +35,7 @@ describe Spectator::Matchers::RegexMatcher do
it "mentions =~" do
value = "foobar"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.message(partial).should contain("=~")
end
@ -44,7 +44,7 @@ describe Spectator::Matchers::RegexMatcher do
value = "foobar"
label = "different"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(label, value)
partial = new_partial(value, label)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.message(partial).should contain(label)
end
@ -53,7 +53,7 @@ describe Spectator::Matchers::RegexMatcher do
value = "foobar"
label = "different"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(label, pattern)
matcher.message(partial).should contain(label)
end
@ -62,7 +62,7 @@ describe Spectator::Matchers::RegexMatcher do
it "contains stringified form of expected value" do
value = "foobar"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.message(partial).should contain(pattern.to_s)
end
@ -73,7 +73,7 @@ describe Spectator::Matchers::RegexMatcher do
it "mentions =~" do
value = "foobar"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.negated_message(partial).should contain("=~")
end
@ -82,7 +82,7 @@ describe Spectator::Matchers::RegexMatcher do
value = "foobar"
label = "different"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(label, value)
partial = new_partial(value, label)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.negated_message(partial).should contain(label)
end
@ -91,7 +91,7 @@ describe Spectator::Matchers::RegexMatcher do
value = "foobar"
label = "different"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(label, pattern)
matcher.negated_message(partial).should contain(label)
end
@ -100,7 +100,7 @@ describe Spectator::Matchers::RegexMatcher do
it "contains stringified form of expected value" do
value = "foobar"
pattern = /foo/
partial = Spectator::Expectations::ValueExpectationPartial.new(value)
partial = new_partial(value)
matcher = Spectator::Matchers::RegexMatcher.new(pattern)
matcher.negated_message(partial).should contain(pattern.to_s)
end