caricature 0.1.2 → 0.2.0
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/spec/{isolator_spec.rb → isolation_spec.rb} +0 -0
- data/spec/proxy_spec.rb +14 -6
- metadata +3 -3
File without changes
|
data/spec/proxy_spec.rb
CHANGED
@@ -9,11 +9,11 @@ describe "Caricature::RecordingProxy" do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
it "should forward existing methods" do
|
12
|
-
@proxy.name.should.equal @subj.name
|
12
|
+
@proxy.___super___.name.should.equal @subj.name
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should call to_s on the proxied object" do
|
16
|
-
@proxy.to_s.should.equal @subj.to_s
|
16
|
+
@proxy.___super___.to_s.should.equal @subj.to_s
|
17
17
|
end
|
18
18
|
|
19
19
|
describe "when invoking a method" do
|
@@ -22,6 +22,10 @@ describe "Caricature::RecordingProxy" do
|
|
22
22
|
@proxy.name
|
23
23
|
end
|
24
24
|
|
25
|
+
it "should return nil" do
|
26
|
+
@proxy.name.should.be.nil
|
27
|
+
end
|
28
|
+
|
25
29
|
it "should record a call" do
|
26
30
|
@recorder.size.should.equal 1
|
27
31
|
end
|
@@ -49,8 +53,8 @@ describe "Caricature::RecordingClrProxy" do
|
|
49
53
|
|
50
54
|
it "should create a proxy" do
|
51
55
|
|
52
|
-
@proxy.name.should.equal @samurai.name
|
53
|
-
@proxy.id.should.equal 0
|
56
|
+
@proxy.___super___.name.should.equal @samurai.name
|
57
|
+
@proxy.___super___.id.should.equal 0
|
54
58
|
end
|
55
59
|
|
56
60
|
describe "when invoking a method" do
|
@@ -59,6 +63,10 @@ describe "Caricature::RecordingClrProxy" do
|
|
59
63
|
@proxy.name
|
60
64
|
end
|
61
65
|
|
66
|
+
it "should return nil" do
|
67
|
+
@proxy.name.should.be.nil
|
68
|
+
end
|
69
|
+
|
62
70
|
it "should record a call" do
|
63
71
|
@recorder.size.should.equal 1
|
64
72
|
end
|
@@ -82,8 +90,8 @@ describe "Caricature::RecordingClrProxy" do
|
|
82
90
|
end
|
83
91
|
|
84
92
|
it "should create a proxy" do
|
85
|
-
@proxy.
|
86
|
-
@proxy.id.should.equal 0
|
93
|
+
@proxy.___super___.class.should.equal ClrModels::Ninja
|
94
|
+
@proxy.___super___.id.should.equal 0
|
87
95
|
end
|
88
96
|
|
89
97
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caricature
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Porto Carrero
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-11 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -58,7 +58,7 @@ test_files:
|
|
58
58
|
- spec/core_ext_spec.rb
|
59
59
|
- spec/expectation_spec.rb
|
60
60
|
- spec/interop_spec.rb
|
61
|
-
- spec/
|
61
|
+
- spec/isolation_spec.rb
|
62
62
|
- spec/method_call_spec.rb
|
63
63
|
- spec/proxy_spec.rb
|
64
64
|
- spec/verification_spec.rb
|