Class: Mock::Block

Inherits:
Object show all
Defined in:
lib/riveter/spec_helper.rb

Instance Method Summary collapse

Instance Method Details

#callObject

the call method must be provided by in specs E.g. using ‘expect(mock_block_instance).to receive(:call)` to assert that the “block” gets called

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/riveter/spec_helper.rb', line 11

def call
  raise NotImplementedError, "Expecting `call` method to have an expectation defined to assert."
end

#to_procObject



5
6
7
# File 'lib/riveter/spec_helper.rb', line 5

def to_proc
  lambda { |*args| call(*args) }
end