verified_double 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +11 -0
- data/README.md +1 -1
- data/features/CHANGELOG.markdown +11 -0
- data/features/readme.md +1 -1
- data/lib/verified_double/method_signature_value.rb +3 -1
- data/lib/verified_double/version.rb +1 -1
- data/spec/verified_double/method_signature_value_spec.rb +9 -0
- data/verified_double.gemspec +1 -1
- metadata +8 -8
data/CHANGELOG.markdown
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
0.1.1 - 2013-06-26
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Constantize should be a runtime dependency since constantize is used in
|
5
|
+
VerifiedDouble::MethodSignatureValue.
|
6
|
+
|
7
|
+
* [#10] Fix VerifiedDouble::MethodSignatureValue#modified_class.
|
8
|
+
If the value is an rspec double, the modified_class should be the class
|
9
|
+
represented by the double's name.
|
10
|
+
|
11
|
+
|
1
12
|
0.1.0 - 2013-06-24
|
2
13
|
------------------
|
3
14
|
|
data/README.md
CHANGED
@@ -34,4 +34,4 @@ References
|
|
34
34
|
Special thanks
|
35
35
|
--------------
|
36
36
|
|
37
|
-
To
|
37
|
+
To [Thomas Sinclair](https://twitter.com/anathematic) and [Inner Core Designs](http://icdesign.com.au) for sponsoring this gem :)
|
data/features/CHANGELOG.markdown
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
0.1.1 - 2013-06-26
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Constantize should be a runtime dependency since constantize is used in
|
5
|
+
VerifiedDouble::MethodSignatureValue.
|
6
|
+
|
7
|
+
* [#10] Fix VerifiedDouble::MethodSignatureValue#modified_class.
|
8
|
+
If the value is an rspec double, the modified_class should be the class
|
9
|
+
represented by the double's name.
|
10
|
+
|
11
|
+
|
1
12
|
0.1.0 - 2013-06-24
|
2
13
|
------------------
|
3
14
|
|
data/features/readme.md
CHANGED
@@ -34,4 +34,4 @@ References
|
|
34
34
|
Special thanks
|
35
35
|
--------------
|
36
36
|
|
37
|
-
To
|
37
|
+
To [Thomas Sinclair](https://twitter.com/anathematic) and [Inner Core Designs](http://icdesign.com.au) for sponsoring this gem :)
|
@@ -27,7 +27,9 @@ module VerifiedDouble
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def modified_class
|
30
|
-
if value.is_a?(
|
30
|
+
if value.is_a?(RSpec::Mocks::Mock)
|
31
|
+
value.instance_variable_get('@name').constantize
|
32
|
+
elsif value.is_a?(VerifiedDouble::RecordingDouble)
|
31
33
|
value.class_name.constantize
|
32
34
|
elsif value == true or value == false
|
33
35
|
VerifiedDouble::Boolean
|
@@ -62,6 +62,15 @@ describe VerifiedDouble::MethodSignatureValue do
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
context "where the value is a double" do
|
66
|
+
let(:d){ double('Object') }
|
67
|
+
let(:method_signature_value) { described_class.new(d) }
|
68
|
+
|
69
|
+
it "is the class represented by the class_name of the recording double" do
|
70
|
+
expect(subject).to eq(Object)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
65
74
|
context "where the value is true" do
|
66
75
|
let(:method_signature_value) { described_class.new(true) }
|
67
76
|
it { expect(subject).to eq(VerifiedDouble::Boolean) }
|
data/verified_double.gemspec
CHANGED
@@ -17,10 +17,10 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
+
gem.add_runtime_dependency "activesupport"
|
20
21
|
gem.add_runtime_dependency "rspec"
|
21
22
|
|
22
23
|
gem.add_development_dependency "aruba"
|
23
24
|
gem.add_development_dependency "cucumber"
|
24
25
|
gem.add_development_dependency "pry"
|
25
|
-
gem.add_development_dependency "activesupport"
|
26
26
|
end
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: verified_double
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- George Mendoza
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
type: :runtime
|
@@ -26,9 +26,9 @@ dependencies:
|
|
26
26
|
- - ! '>='
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '0'
|
29
|
-
name:
|
29
|
+
name: activesupport
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
type: :
|
31
|
+
type: :runtime
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
- - ! '>='
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
|
-
name:
|
45
|
+
name: rspec
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
type: :development
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
- - ! '>='
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
|
-
name:
|
61
|
+
name: aruba
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
type: :development
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
- - ! '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
|
-
name:
|
77
|
+
name: cucumber
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
type: :development
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ dependencies:
|
|
90
90
|
- - ! '>='
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
|
-
name:
|
93
|
+
name: pry
|
94
94
|
description: Contract tests for rspec
|
95
95
|
email:
|
96
96
|
- gsmendoza@gmail.com
|