mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Change includes to has
This commit is contained in:
parent
20caed9262
commit
891cd4bbf7
1 changed files with 5 additions and 5 deletions
|
@ -16,7 +16,7 @@ module Spectator::Matchers
|
||||||
# This explains what condition satisfies the matcher.
|
# This explains what condition satisfies the matcher.
|
||||||
# The description is used when the one-liner syntax is used.
|
# The description is used when the one-liner syntax is used.
|
||||||
def description : String
|
def description : String
|
||||||
"includes #{expected.label}"
|
"has #{expected.label}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Entrypoint for the matcher, forwards to the correct method for string or enumerable.
|
# Entrypoint for the matcher, forwards to the correct method for string or enumerable.
|
||||||
|
@ -42,7 +42,7 @@ module Spectator::Matchers
|
||||||
SuccessfulMatchData.new(description)
|
SuccessfulMatchData.new(description)
|
||||||
else
|
else
|
||||||
# Content is missing.
|
# Content is missing.
|
||||||
FailedMatchData.new(description, "#{actual_label} does not include #{expected.label}",
|
FailedMatchData.new(description, "#{actual_label} does not have #{expected.label}",
|
||||||
expected: expected.value.inspect,
|
expected: expected.value.inspect,
|
||||||
actual: actual_value.inspect,
|
actual: actual_value.inspect,
|
||||||
missing: missing.inspect,
|
missing: missing.inspect,
|
||||||
|
@ -60,7 +60,7 @@ module Spectator::Matchers
|
||||||
if missing.empty?
|
if missing.empty?
|
||||||
SuccessfulMatchData.new(description)
|
SuccessfulMatchData.new(description)
|
||||||
else
|
else
|
||||||
FailedMatchData.new(description, "#{actual_label} does not include #{expected.label}",
|
FailedMatchData.new(description, "#{actual_label} does not have #{expected.label}",
|
||||||
expected: expected.value.inspect,
|
expected: expected.value.inspect,
|
||||||
actual: actual_value.inspect,
|
actual: actual_value.inspect,
|
||||||
missing: missing.inspect,
|
missing: missing.inspect,
|
||||||
|
@ -89,7 +89,7 @@ module Spectator::Matchers
|
||||||
|
|
||||||
if satisfied
|
if satisfied
|
||||||
# Contents are present.
|
# Contents are present.
|
||||||
FailedMatchData.new(description, "#{actual_label} includes #{expected.label}",
|
FailedMatchData.new(description, "#{actual_label} has #{expected.label}",
|
||||||
expected: "Not #{expected.value.inspect}",
|
expected: "Not #{expected.value.inspect}",
|
||||||
actual: actual_value.inspect
|
actual: actual_value.inspect
|
||||||
)
|
)
|
||||||
|
@ -109,7 +109,7 @@ module Spectator::Matchers
|
||||||
if satisfied
|
if satisfied
|
||||||
SuccessfulMatchData.new(description)
|
SuccessfulMatchData.new(description)
|
||||||
else
|
else
|
||||||
FailedMatchData.new(description, "#{actual_label} does not include #{expected.label}",
|
FailedMatchData.new(description, "#{actual_label} does not have #{expected.label}",
|
||||||
expected: expected.value.inspect,
|
expected: expected.value.inspect,
|
||||||
actual: actual_value.inspect,
|
actual: actual_value.inspect,
|
||||||
missing: missing.inspect,
|
missing: missing.inspect,
|
||||||
|
|
Loading…
Reference in a new issue