Fix failing tests

This commit is contained in:
Michael Miller 2019-04-06 12:48:41 -06:00
parent dd943c9046
commit 365bd1ec2f
2 changed files with 4 additions and 3 deletions

View file

@ -59,8 +59,9 @@ describe Spectator::Expectations::Expectation do
match_data = new_matcher(value).match(new_partial(value)) match_data = new_matcher(value).match(new_partial(value))
expectation = Spectator::Expectations::Expectation.new(match_data, true) expectation = Spectator::Expectations::Expectation.new(match_data, true)
expectation.values.each do |labeled_value| expectation.values.each do |labeled_value|
label = labeled_value.label
value = labeled_value.value value = labeled_value.value
value.to_s.should start_with(/not/i) if value.responds_to?(:negate) value.to_s.should start_with(/not/i) if label == :expected
end end
end end
end end

View file

@ -21,12 +21,12 @@ module Spectator::Matchers
# Produces a stringified value. # Produces a stringified value.
def to_s(io) def to_s(io)
value.inspect(io) io << value
end end
# Produces a stringified value with additional information. # Produces a stringified value with additional information.
def inspect(io) def inspect(io)
value.inspect(io) io << value
end end
end end
end end