Module: Spec::Mocks::Methods
Instance Method Summary collapse
-
#received_message?(sym, *args, &block) ⇒ Boolean
:nodoc:.
-
#rspec_reset ⇒ Object
:nodoc:.
-
#rspec_verify ⇒ Object
:nodoc:.
- #should_not_receive(sym, &block) ⇒ Object
- #should_receive(sym, opts = {}, &block) ⇒ Object
- #stub!(sym) ⇒ Object
Instance Method Details
#received_message?(sym, *args, &block) ⇒ Boolean
:nodoc:
16 17 18 |
# File 'lib/spec/mocks/methods.rb', line 16 def (sym, *args, &block) #:nodoc: __mock_proxy.(sym.to_sym, *args, &block) end |
#rspec_reset ⇒ Object
:nodoc:
24 25 26 |
# File 'lib/spec/mocks/methods.rb', line 24 def rspec_reset #:nodoc: __mock_proxy.reset end |
#rspec_verify ⇒ Object
:nodoc:
20 21 22 |
# File 'lib/spec/mocks/methods.rb', line 20 def rspec_verify #:nodoc: __mock_proxy.verify end |
#should_not_receive(sym, &block) ⇒ Object
8 9 10 |
# File 'lib/spec/mocks/methods.rb', line 8 def should_not_receive(sym, &block) __mock_proxy.(caller(1)[0], sym.to_sym, &block) end |
#should_receive(sym, opts = {}, &block) ⇒ Object
4 5 6 |
# File 'lib/spec/mocks/methods.rb', line 4 def should_receive(sym, opts={}, &block) __mock_proxy.(opts[:expected_from] || caller(1)[0], sym.to_sym, opts, &block) end |
#stub!(sym) ⇒ Object
12 13 14 |
# File 'lib/spec/mocks/methods.rb', line 12 def stub!(sym) __mock_proxy.add_stub(caller(1)[0], sym.to_sym) end |