mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use MatchData
This commit is contained in:
parent
0bf106ab2e
commit
c1f61d68bf
2 changed files with 3 additions and 3 deletions
|
@ -19,8 +19,8 @@ end
|
||||||
def new_expectation(expected : ExpectedType = 123, actual : ActualType = 123) forall ExpectedType, ActualType
|
def new_expectation(expected : ExpectedType = 123, actual : ActualType = 123) forall ExpectedType, ActualType
|
||||||
partial = new_partial(actual, "foo")
|
partial = new_partial(actual, "foo")
|
||||||
matcher = new_matcher("bar", expected)
|
matcher = new_matcher("bar", expected)
|
||||||
matched = matcher.match?(partial)
|
match_data = matcher.match(partial)
|
||||||
Spectator::Expectations::Expectation.new(matched, false, partial, matcher)
|
Spectator::Expectations::Expectation.new(match_data, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_satisfied_expectation(value : T = 123) forall T
|
def new_satisfied_expectation(value : T = 123) forall T
|
||||||
|
|
|
@ -7,7 +7,7 @@ module Spectator::Expectations
|
||||||
# when the expectation was evaluated.
|
# when the expectation was evaluated.
|
||||||
# The *negated* flag and `MatchData#matched?` flag
|
# The *negated* flag and `MatchData#matched?` flag
|
||||||
# are mutually-exclusive in this context.
|
# are mutually-exclusive in this context.
|
||||||
def initialize(@match_data : MatchData, @negated : Bool)
|
def initialize(@match_data : Spectator::Matchers::MatchData, @negated : Bool)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Indicates whether the expectation was satisifed.
|
# Indicates whether the expectation was satisifed.
|
||||||
|
|
Loading…
Reference in a new issue