mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Various fixes
This commit is contained in:
parent
bbaa8816b8
commit
1199379833
3 changed files with 40 additions and 32 deletions
|
@ -4,7 +4,6 @@ require "./stub"
|
|||
require "./stubbable"
|
||||
require "./stubbed_name"
|
||||
require "./unexpected_message"
|
||||
require "./value_stub"
|
||||
|
||||
module Spectator
|
||||
# Stands in for an object for testing that a SUT calls expected methods.
|
||||
|
@ -77,6 +76,15 @@ module Spectator
|
|||
def initialize(@stubs : Array(Stub) = [] of Stub)
|
||||
end
|
||||
|
||||
# Compares against another object.
|
||||
#
|
||||
# Always returns false.
|
||||
# This method exists as a workaround to provide an alternative to `Object#same?`,
|
||||
# which only accepts a `Reference` or `Nil`.
|
||||
def same?(other) : Bool
|
||||
false
|
||||
end
|
||||
|
||||
# Defines a stub to change the behavior of a method in this double.
|
||||
#
|
||||
# NOTE: Defining a stub for a method not defined in the double's type has no effect.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue