Update harness to match recent changes

This commit is contained in:
Michael Miller 2018-11-13 21:44:25 -07:00
parent a66262d197
commit a3ac50d661
2 changed files with 6 additions and 6 deletions

View File

@ -36,14 +36,14 @@ module Spectator::Internals
# Reports the outcome of an expectation. # Reports the outcome of an expectation.
# An exception will be raised when a failing result is given. # An exception will be raised when a failing result is given.
def report_expectation(result : Expectations::Expectation::Result) : Nil def report_expectation(expectation : Expectations::Expectation) : Nil
@reporter.report(result) @reporter.report(expectation)
end end
# Generates the reported expectation results from the example. # Generates the reported expectations from the example.
# This should be run after the example has finished. # This should be run after the example has finished.
def expectation_results : Expectations::ExpectationResults def expectations : Expectations::ExampleExpectations
@reporter.results @reporter.expectations
end end
# Creates a new harness. # Creates a new harness.

View File

@ -10,7 +10,7 @@ module Spectator
# and translates to a usable result. # and translates to a usable result.
def run_impl : Result def run_impl : Result
result = capture_result result = capture_result
expectations = Internals::Harness.current.expectation_results expectations = Internals::Harness.current.expectations
translate_result(result, expectations) translate_result(result, expectations)
end end