markevans-method_call_recorder 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +6 -0
- data/VERSION +1 -1
- data/lib/method_call_recorder/method_call_recorder.rb +1 -1
- data/method_call_recorder.gemspec +1 -1
- data/spec/method_call_recorder_spec.rb +4 -6
- metadata +1 -1
data/README.markdown
CHANGED
@@ -17,6 +17,12 @@ Using the last example:
|
|
17
17
|
method_call.method # :[] (a symbol representing the method call)
|
18
18
|
method_call.args # [1] (an array of the args)
|
19
19
|
|
20
|
+
You can reset the recorded method chain using
|
21
|
+
|
22
|
+
rec._reset!
|
23
|
+
|
24
|
+
For a few methods, see the specs (sorry!)
|
25
|
+
|
20
26
|
Install
|
21
27
|
-------
|
22
28
|
Install from github gems in usual way
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -50,13 +50,11 @@ describe MethodCallRecorder do
|
|
50
50
|
end
|
51
51
|
|
52
52
|
it "should allow resetting the method chain" do
|
53
|
-
|
54
|
-
|
55
|
-
@rec.
|
56
|
-
@rec._method_chain.should == [mc1]
|
53
|
+
mc = stub_method_call(:some_method)
|
54
|
+
@rec.some_method
|
55
|
+
@rec._method_chain.should == [mc]
|
57
56
|
@rec._reset!
|
58
|
-
@rec.
|
59
|
-
@rec._method_chain.should == [mc1, mc2]
|
57
|
+
@rec._method_chain.should == []
|
60
58
|
end
|
61
59
|
|
62
60
|
it "should yield the current sub object, and the next two methods to be called as it plays back" do
|