diff --git a/spec/matchers/end_with_matcher_spec.cr b/spec/matchers/end_with_matcher_spec.cr index ea9a828..68ea5a0 100644 --- a/spec/matchers/end_with_matcher_spec.cr +++ b/spec/matchers/end_with_matcher_spec.cr @@ -202,6 +202,13 @@ describe Spectator::Matchers::EndWithMatcher do matcher = Spectator::Matchers::EndWithMatcher.new(array.last) matcher.message(partial).should contain("===") end + + it "mentions last" do + array = %i[a b c] + partial = Spectator::Expectations::ValueExpectationPartial.new(array) + matcher = Spectator::Matchers::EndWithMatcher.new(array.last) + matcher.message(partial).should contain("last") + end end it "contains the actual label" do @@ -251,6 +258,13 @@ describe Spectator::Matchers::EndWithMatcher do matcher = Spectator::Matchers::EndWithMatcher.new(array.last) matcher.negated_message(partial).should contain("===") end + + it "mentions last" do + array = %i[a b c] + partial = Spectator::Expectations::ValueExpectationPartial.new(array) + matcher = Spectator::Matchers::EndWithMatcher.new(array.last) + matcher.negated_message(partial).should contain("last") + end end it "contains the actual label" do diff --git a/spec/matchers/start_with_matcher_spec.cr b/spec/matchers/start_with_matcher_spec.cr index 69930d3..ebc6ea4 100644 --- a/spec/matchers/start_with_matcher_spec.cr +++ b/spec/matchers/start_with_matcher_spec.cr @@ -202,6 +202,13 @@ describe Spectator::Matchers::StartWithMatcher do matcher = Spectator::Matchers::StartWithMatcher.new(array.first) matcher.message(partial).should contain("===") end + + it "mentions first" do + array = %i[a b c] + partial = Spectator::Expectations::ValueExpectationPartial.new(array) + matcher = Spectator::Matchers::StartWithMatcher.new(array.first) + matcher.message(partial).should contain("first") + end end it "contains the actual label" do @@ -251,6 +258,13 @@ describe Spectator::Matchers::StartWithMatcher do matcher = Spectator::Matchers::StartWithMatcher.new(array.first) matcher.negated_message(partial).should contain("===") end + + it "mentions first" do + array = %i[a b c] + partial = Spectator::Expectations::ValueExpectationPartial.new(array) + matcher = Spectator::Matchers::StartWithMatcher.new(array.first) + matcher.negated_message(partial).should contain("first") + end end it "contains the actual label" do