mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Remove unused methods
This commit is contained in:
parent
b137a8e742
commit
4b2b37477e
1 changed files with 3 additions and 12 deletions
|
@ -6,9 +6,12 @@ require "./matcher"
|
||||||
module Spectator::Matchers
|
module Spectator::Matchers
|
||||||
# Matcher that inspects stubbable objects for method calls.
|
# Matcher that inspects stubbable objects for method calls.
|
||||||
struct ReceiveMatcher < Matcher
|
struct ReceiveMatcher < Matcher
|
||||||
|
# Creates the matcher for expecting a method call matching a stub.
|
||||||
def initialize(@stub : Stub)
|
def initialize(@stub : Stub)
|
||||||
end
|
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))
|
def initialize(expected : Expression(Symbol))
|
||||||
stub = NullStub.new(expected.value).as(Stub)
|
stub = NullStub.new(expected.value).as(Stub)
|
||||||
initialize(stub)
|
initialize(stub)
|
||||||
|
@ -55,18 +58,6 @@ module Spectator::Matchers
|
||||||
{% raise "Value being checked with `have_received` must be stubbable (mock or double)." %}
|
{% raise "Value being checked with `have_received` must be stubbable (mock or double)." %}
|
||||||
end
|
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.
|
# Additional information about the match failure.
|
||||||
private def values(actual : Expression(T)) forall T
|
private def values(actual : Expression(T)) forall T
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue