From c197f3236f41adf89161eaa656d1470991435833 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Fri, 22 Mar 2019 13:01:55 -0600 Subject: [PATCH] Actual values should not be prefixed --- src/spectator/matchers/greater_than_equal_matcher.cr | 7 +------ src/spectator/matchers/greater_than_matcher.cr | 7 +------ src/spectator/matchers/less_than_equal_matcher.cr | 7 +------ src/spectator/matchers/less_than_matcher.cr | 7 +------ 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/spectator/matchers/greater_than_equal_matcher.cr b/src/spectator/matchers/greater_than_equal_matcher.cr index e9e716e..4ac07aa 100644 --- a/src/spectator/matchers/greater_than_equal_matcher.cr +++ b/src/spectator/matchers/greater_than_equal_matcher.cr @@ -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 diff --git a/src/spectator/matchers/greater_than_matcher.cr b/src/spectator/matchers/greater_than_matcher.cr index e9e239c..a96947e 100644 --- a/src/spectator/matchers/greater_than_matcher.cr +++ b/src/spectator/matchers/greater_than_matcher.cr @@ -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 diff --git a/src/spectator/matchers/less_than_equal_matcher.cr b/src/spectator/matchers/less_than_equal_matcher.cr index 98d6278..ff3fc10 100644 --- a/src/spectator/matchers/less_than_equal_matcher.cr +++ b/src/spectator/matchers/less_than_equal_matcher.cr @@ -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 diff --git a/src/spectator/matchers/less_than_matcher.cr b/src/spectator/matchers/less_than_matcher.cr index c66bda7..3cb12e6 100644 --- a/src/spectator/matchers/less_than_matcher.cr +++ b/src/spectator/matchers/less_than_matcher.cr @@ -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