Class: Bogus::Double
- Inherits:
-
Object
- Object
- Bogus::Double
- Extended by:
- Takes
- Includes:
- ProxiesMethodCalls
- Defined in:
- lib/bogus/stubbing/double.rb
Instance Method Summary collapse
- #mock ⇒ Object
- #mocks(name, *args, &return_value) ⇒ Object
- #stub ⇒ Object
- #stubs(name, *args, &return_value) ⇒ Object
Methods included from Takes
Methods included from ProxiesMethodCalls
Instance Method Details
#mock ⇒ Object
21 22 23 |
# File 'lib/bogus/stubbing/double.rb', line 21 def mock proxy(:mocks) end |
#mocks(name, *args, &return_value) ⇒ Object
25 26 27 28 |
# File 'lib/bogus/stubbing/double.rb', line 25 def mocks(name, *args, &return_value) stubs(name, *args, &return_value) object.__shadow__.mocks(name, *args, &return_value) end |
#stub ⇒ Object
9 10 11 |
# File 'lib/bogus/stubbing/double.rb', line 9 def stub proxy(:stubs) end |
#stubs(name, *args, &return_value) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/bogus/stubbing/double.rb', line 13 def stubs(name, *args, &return_value) verifies_stub_definition.verify!(object, name, args) double_tracker.track(object) records_double_interactions.record(object, name, args, &return_value) overwrites_methods.overwrite(object, name) object.__shadow__.stubs(name, *args, &return_value) end |