Class: RSpec::Fire::FireObjectDouble

Inherits:
Mocks::Mock
  • Object
show all
Includes:
FireDoublable
Defined in:
lib/rspec/fire/legacy.rb

Instance Method Summary collapse

Methods included from FireDoublable

#should_not_receive, #should_receive, #stub, #stub!, #with_doubled_class

Methods included from RecursiveConstMethods

#const_defined_on?, #get_const_defined_on, #recursive_const_defined?, #recursive_const_get

Constructor Details

#initialize(doubled_class, *args) ⇒ FireObjectDouble

Returns a new instance of FireObjectDouble.



242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/rspec/fire/legacy.rb', line 242

def initialize(doubled_class, *args)
  args << {} unless Hash === args.last

  @__doubled_class_name = doubled_class
  verify_constant_name if RSpec::Fire.configuration.verify_constant_names?

  # __declared_as copied from rspec/mocks definition of `double`
  args.last[:__declared_as] = 'FireDouble'

  @__checked_methods = :public_instance_methods
  @__method_finder   = :instance_method

  super
end