Actual values should not be prefixed

This commit is contained in:
Michael Miller 2019-03-22 13:01:55 -06:00
parent c156c55c72
commit c197f3236f
4 changed files with 4 additions and 24 deletions

View file

@ -27,15 +27,10 @@ module Spectator::Matchers
def named_tuple
{
expected: NegatablePrefixedMatchDataValue.new(">=", "<", @values.expected),
actual: PrefixedMatchDataValue.new(actual_operator, @values.actual),
actual: @values.actual,
}
end
# Textual operator for the actual value.
private def actual_operator
matched? ? ">=" : "<"
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message

View file

@ -27,15 +27,10 @@ module Spectator::Matchers
def named_tuple
{
expected: NegatablePrefixedMatchDataValue.new(">", "<=", @values.expected),
actual: PrefixedMatchDataValue.new(actual_operator, @values.actual),
actual: @values.actual,
}
end
# Textual operator for the actual value.
private def actual_operator
matched? ? ">" : "<="
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message

View file

@ -27,15 +27,10 @@ module Spectator::Matchers
def named_tuple
{
expected: NegatablePrefixedMatchDataValue.new("<=", ">", @values.expected),
actual: PrefixedMatchDataValue.new(actual_operator, @values.actual),
actual: @values.actual,
}
end
# Textual operator for the actual value.
private def actual_operator
matched? ? "<=" : ">"
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message

View file

@ -27,15 +27,10 @@ module Spectator::Matchers
def named_tuple
{
expected: NegatablePrefixedMatchDataValue.new("<", ">=", @values.expected),
actual: PrefixedMatchDataValue.new(actual_operator, @values.actual),
actual: @values.actual,
}
end
# Textual operator for the actual value.
private def actual_operator
matched? ? "<" : ">="
end
# Describes the condition that satisfies the matcher.
# This is informational and displayed to the end-user.
def message