Class: NilClass
Instance Method Summary collapse
-
#expects!(mname, *args) ⇒ Object
Overridden to protect against accidental nil reference self delusion.
-
#intentionally_expects! ⇒ Object
Use this only if you really mean it.
-
#intentionally_stubs! ⇒ Object
Use this only if you really mean it.
-
#stubs!(mname) ⇒ Object
Overridden to protect against accidental nil reference self delusion.
Instance Method Details
#expects!(mname, *args) ⇒ Object
Overridden to protect against accidental nil reference self delusion
171 172 173 |
# File 'lib/hardmock/stubbing.rb', line 171 def expects!(mname, *args) raise StubbingError, "Cannot mock #{mname} method on nil. (If you really mean to, try 'intentionally_expects!')" end |
#intentionally_expects! ⇒ Object
Use this only if you really mean it
163 |
# File 'lib/hardmock/stubbing.rb', line 163 alias_method :intentionally_expects!, :expects! |
#intentionally_stubs! ⇒ Object
Use this only if you really mean it
160 |
# File 'lib/hardmock/stubbing.rb', line 160 alias_method :intentionally_stubs!, :stubs! |
#stubs!(mname) ⇒ Object
Overridden to protect against accidental nil reference self delusion
166 167 168 |
# File 'lib/hardmock/stubbing.rb', line 166 def stubs!(mname) raise StubbingError, "Cannot stub #{mname} method on nil. (If you really mean to, try 'intentionally_stubs!')" end |