mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Minor adjustments to equality matcher
This commit is contained in:
parent
ec06daaf35
commit
50a782b803
2 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
require "../spec_helper"
|
||||
|
||||
describe Spectator::Matchers::EqualityMatcher do
|
||||
describe "#match" do
|
||||
it "compares using #==" do
|
||||
spy = SpySUT.new
|
||||
partial = new_partial(spy)
|
||||
|
@ -9,7 +10,6 @@ describe Spectator::Matchers::EqualityMatcher do
|
|||
spy.eq_call_count.should be > 0
|
||||
end
|
||||
|
||||
describe "#match" do
|
||||
context "returned MatchData" do
|
||||
describe "#matched?" do
|
||||
context "with identical values" do
|
||||
|
|
|
@ -11,7 +11,7 @@ module Spectator::Matchers
|
|||
|
||||
# Determines whether the matcher is satisfied with the partial given to it.
|
||||
# `MatchData` is returned that contains information about the match.
|
||||
def match(partial) : MatchData
|
||||
def match(partial)
|
||||
values = ExpectedActual.new(partial, self)
|
||||
MatchData.new(match?(values.actual), values)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue