Module: RSpec::Fire
- Defined in:
- lib/rspec/fire.rb
Defined Under Namespace
Modules: FireDoublable, RecursiveConstMethods
Classes: Configuration, FireClassDoubleBuilder, FireObjectDouble, ShouldProxy, SupportArityMatcher
Constant Summary
collapse
- Error =
Class.new(StandardError)
- UndefinedConstantError =
Class.new(Error)
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.configuration ⇒ Object
16
17
18
|
# File 'lib/rspec/fire.rb', line 16
def self.configuration
@configuration ||= Configuration.new
end
|
20
21
22
|
# File 'lib/rspec/fire.rb', line 20
def self.configure
yield configuration
end
|
.find_original_value_for(constant_name) {|const.original_value| ... } ⇒ Object
291
292
293
294
|
# File 'lib/rspec/fire.rb', line 291
def self.find_original_value_for(constant_name)
const = ::RSpec::Mocks::Constant.original(constant_name)
yield const.original_value if const.stubbed?
end
|
Instance Method Details
#fire_class_double(*args) ⇒ Object
#fire_double(*args) ⇒ Object
296
297
298
|
# File 'lib/rspec/fire.rb', line 296
def fire_double(*args)
FireObjectDouble.new(*args)
end
|
#fire_replaced_class_double(*args) ⇒ Object
304
305
306
|
# File 'lib/rspec/fire.rb', line 304
def fire_replaced_class_double(*args)
fire_class_double(*args).as_replaced_constant
end
|