diff --git a/src/spectator/matchers/dummy_match_data.cr b/src/spectator/matchers/dummy_match_data.cr deleted file mode 100644 index 39fedb7..0000000 --- a/src/spectator/matchers/dummy_match_data.cr +++ /dev/null @@ -1,30 +0,0 @@ -require "./match_data" - -module Spectator::Matchers - # Match data that does nothing useful. - # This is a workaround for a compilation issue - hopefully temporary. - # This might be the same issue that `DummyExample` solves. - # Without this, the Crystal compiler complains: - # ```text - # undefined method 'Spectator::Matchers::MatchData#message()' - # ``` - # The method is clearly defined by `MatchData`, just abstract. - # Additionally, there are implementations of `MatchData` - - # see `NilMatcher::MatchData`. - private struct DummyMatchData < MatchData - # Dummy values. - def values - {expected: nil, actual: nil} - end - - # Dummy message. - def message - "DUMMY" - end - - # Dummy message. - def negated_message - "DUMMY" - end - end -end diff --git a/src/spectator/matchers/matcher.cr b/src/spectator/matchers/matcher.cr index dad3229..1618eb4 100644 --- a/src/spectator/matchers/matcher.cr +++ b/src/spectator/matchers/matcher.cr @@ -1,3 +1,5 @@ +require "./match_data" + module Spectator::Matchers # Common base class for all expectation conditions. # A matcher looks at something produced by the SUT