mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Check for mentions of first and last
This commit is contained in:
parent
a91758b3f3
commit
5f9c0385ad
2 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue