Use MatchData

This commit is contained in:
Michael Miller 2019-02-26 20:29:04 -07:00
parent 0bf106ab2e
commit c1f61d68bf
2 changed files with 3 additions and 3 deletions

View file

@ -19,8 +19,8 @@ end
def new_expectation(expected : ExpectedType = 123, actual : ActualType = 123) forall ExpectedType, ActualType
partial = new_partial(actual, "foo")
matcher = new_matcher("bar", expected)
matched = matcher.match?(partial)
Spectator::Expectations::Expectation.new(matched, false, partial, matcher)
match_data = matcher.match(partial)
Spectator::Expectations::Expectation.new(match_data, false)
end
def new_satisfied_expectation(value : T = 123) forall T

View file

@ -7,7 +7,7 @@ module Spectator::Expectations
# when the expectation was evaluated.
# The *negated* flag and `MatchData#matched?` flag
# are mutually-exclusive in this context.
def initialize(@match_data : MatchData, @negated : Bool)
def initialize(@match_data : Spectator::Matchers::MatchData, @negated : Bool)
end
# Indicates whether the expectation was satisifed.