Stubable -> Stubbable

This commit is contained in:
Michael Miller 2022-03-12 15:45:48 -07:00
parent 7931847164
commit f82719746d
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
require "./arguments"
require "./method_call"
require "./stub"
require "./stubable"
require "./stubbable"
require "./stubbed_name"
require "./unexpected_message"
require "./value_stub"
@ -17,7 +17,7 @@ module Spectator
# 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.
abstract class Double
include Stubable
include Stubbable
Log = Spectator::Log.for(self)

View file

@ -9,7 +9,7 @@ module Spectator
# 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 methods can't (and shouldn't) be stubbed.
module Stubable
module Stubbable
# Attempts to find a stub that satisfies a 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.
# 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 body of the method passed to this macro is ignored.
#