class Shoulda::Matchers::Doublespeak::StubImplementation
@private
Attributes
Public Class Methods
Source
# File lib/shoulda/matchers/doublespeak/stub_implementation.rb, line 8 def self.create new end
Source
# File lib/shoulda/matchers/doublespeak/stub_implementation.rb, line 12 def initialize @implementation = proc { nil } end
Public Instance Methods
Source
# File lib/shoulda/matchers/doublespeak/stub_implementation.rb, line 20 def call(call) call.double.record_call(call) implementation.call(call) end
Source
# File lib/shoulda/matchers/doublespeak/stub_implementation.rb, line 16 def returns(value = nil, &block) @implementation = block || proc { value } end