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 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.0
1
+ 0.1.1
@@ -33,7 +33,7 @@ class MethodCallRecorder
33
33
  end
34
34
 
35
35
  def _reset!
36
- _method_chain = []
36
+ self._method_chain = []
37
37
  end
38
38
 
39
39
  def _select(meth, args=nil)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{method_call_recorder}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Mark Evans"]
@@ -50,13 +50,11 @@ describe MethodCallRecorder do
50
50
  end
51
51
 
52
52
  it "should allow resetting the method chain" do
53
- mc1 = stub_method_call(:once)
54
- mc2 = stub_method_call(:twice)
55
- @rec.once
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.twice
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markevans-method_call_recorder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Evans