Module: Spec::Mocks::Methods

Defined in:
lib/helpers/plugin_spec_helper.rb

Instance Method Summary collapse

Instance Method Details

#should_receive_at_least_once(sym, opts = {}, &block) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/helpers/plugin_spec_helper.rb', line 49

def should_receive_at_least_once(sym, opts={}, &block)
  begin
    e = __mock_proxy.add_message_expectation(opts[:expected_from] || caller(1)[0], sym.to_sym, opts, &block).at_least(1)
    __mock_proxy.add_message_expectation(opts[:expected_from] || caller(1)[0], sym.to_sym, opts, &block).any_number_of_times
    e
  end
end