Remove unused methods

This commit is contained in:
Michael Miller 2022-07-12 18:04:55 -06:00
parent b137a8e742
commit 4b2b37477e
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF

View file

@ -6,9 +6,12 @@ require "./matcher"
module Spectator::Matchers
# Matcher that inspects stubbable objects for method calls.
struct ReceiveMatcher < Matcher
# Creates the matcher for expecting a method call matching a stub.
def initialize(@stub : Stub)
end
# Creates the matcher for expecting a method call with any arguments.
# *expected* is an expression evaluating to the method name as a symbol.
def initialize(expected : Expression(Symbol))
stub = NullStub.new(expected.value).as(Stub)
initialize(stub)
@ -55,18 +58,6 @@ module Spectator::Matchers
{% raise "Value being checked with `have_received` must be stubbable (mock or double)." %}
end
private def match_data_description(actual : Expression(T)) : String forall T
match_data_description(actual.label)
end
private def match_data_description(actual_label : String | Symbol) : String
"#{actual_label} #{description}"
end
private def match_data_description(actual_label : Nil) : String
description
end
# Additional information about the match failure.
private def values(actual : Expression(T)) forall T
{