mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Stubable -> Stubbable
This commit is contained in:
parent
7931847164
commit
f82719746d
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
require "./arguments"
|
require "./arguments"
|
||||||
require "./method_call"
|
require "./method_call"
|
||||||
require "./stub"
|
require "./stub"
|
||||||
require "./stubable"
|
require "./stubbable"
|
||||||
require "./stubbed_name"
|
require "./stubbed_name"
|
||||||
require "./unexpected_message"
|
require "./unexpected_message"
|
||||||
require "./value_stub"
|
require "./value_stub"
|
||||||
|
@ -17,7 +17,7 @@ module Spectator
|
||||||
# Only methods defined in the double's type can have stubs.
|
# Only methods defined in the double's type can have stubs.
|
||||||
# New methods are not defines when a stub is added that doesn't have a matching method name.
|
# New methods are not defines when a stub is added that doesn't have a matching method name.
|
||||||
abstract class Double
|
abstract class Double
|
||||||
include Stubable
|
include Stubbable
|
||||||
|
|
||||||
Log = Spectator::Log.for(self)
|
Log = Spectator::Log.for(self)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ module Spectator
|
||||||
# Types including this module must define `#_spectator_find_stub` and `#_spectator_stubbed_name`.
|
# Types including this module must define `#_spectator_find_stub` and `#_spectator_stubbed_name`.
|
||||||
# These are internal, reserved method names by Spectator, hence the `_spectator` prefix.
|
# These are internal, reserved method names by Spectator, hence the `_spectator` prefix.
|
||||||
# These methods can't (and shouldn't) be stubbed.
|
# These methods can't (and shouldn't) be stubbed.
|
||||||
module Stubable
|
module Stubbable
|
||||||
# Attempts to find a stub that satisfies a method call.
|
# Attempts to find a stub that satisfies a method call.
|
||||||
#
|
#
|
||||||
# Returns a stub that matches the method *call*
|
# Returns a stub that matches the method *call*
|
||||||
|
@ -31,7 +31,7 @@ module Spectator
|
||||||
# ```
|
# ```
|
||||||
#
|
#
|
||||||
# The method being stubbed must already exist in the type, parent, or included/extend module.
|
# The method being stubbed must already exist in the type, parent, or included/extend module.
|
||||||
# If it doesn't exist, and a new stubable method is being added, use `#inject_stub` instead.
|
# If it doesn't exist, and a new stubbable method is being added, use `#inject_stub` instead.
|
||||||
# The original's method is called if there are no applicable stubs for the invocation.
|
# The original's method is called if there are no applicable stubs for the invocation.
|
||||||
# The body of the method passed to this macro is ignored.
|
# The body of the method passed to this macro is ignored.
|
||||||
#
|
#
|
Loading…
Reference in a new issue