Class: Expectations::Recorder
- Inherits:
-
BlankSlate
- Object
- BlankSlate
- Expectations::Recorder
- Defined in:
- lib/expectations/recorder.rb
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
- #be ⇒ Object
- #delegate(method) ⇒ Object
- #have ⇒ Object
-
#initialize(subject) ⇒ Recorder
constructor
A new instance of Recorder.
- #not! ⇒ Object
- #receive(meth) ⇒ Object
- #subject! ⇒ Object
- #verify! ⇒ Object
Methods inherited from BlankSlate
find_hidden_method, hide, reveal
Constructor Details
#initialize(subject) ⇒ Recorder
Returns a new instance of Recorder.
4 5 6 |
# File 'lib/expectations/recorder.rb', line 4 def initialize(subject) @subject = subject end |
Instance Attribute Details
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
3 4 5 |
# File 'lib/expectations/recorder.rb', line 3 def subject @subject end |
Instance Method Details
#be ⇒ Object
20 21 22 23 24 |
# File 'lib/expectations/recorder.rb', line 20 def be extend Expectations::StateBasedRecorder << "to be" self end |
#delegate(method) ⇒ Object
26 27 28 29 30 |
# File 'lib/expectations/recorder.rb', line 26 def delegate(method) extend Expectations::DelegateRecorder delegate!(method) self end |
#have ⇒ Object
14 15 16 17 18 |
# File 'lib/expectations/recorder.rb', line 14 def have extend Expectations::StateBasedRecorder << "to have" self end |
#not! ⇒ Object
36 37 38 |
# File 'lib/expectations/recorder.rb', line 36 def not! extend Expectations::ReverseResult end |
#receive(meth) ⇒ Object
8 9 10 11 12 |
# File 'lib/expectations/recorder.rb', line 8 def receive(meth) extend Expectations::MockRecorder receive!(meth) self end |
#subject! ⇒ Object
32 33 34 |
# File 'lib/expectations/recorder.rb', line 32 def subject! subject end |
#verify! ⇒ Object
40 41 42 |
# File 'lib/expectations/recorder.rb', line 40 def verify! verify end |