verified_double 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/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 @anathematic and [Inner Core Designs](http://icdesign.com.au) for sponsoring this gem :)
37
+ To [Thomas Sinclair](https://twitter.com/anathematic) and [Inner Core Designs](http://icdesign.com.au) for sponsoring this gem :)
@@ -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 @anathematic and [Inner Core Designs](http://icdesign.com.au) for sponsoring this gem :)
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?(VerifiedDouble::RecordingDouble)
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
@@ -1,3 +1,3 @@
1
1
  module VerifiedDouble
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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) }
@@ -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.0
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-24 00:00:00.000000000 Z
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: rspec
29
+ name: activesupport
30
30
  - !ruby/object:Gem::Dependency
31
- type: :development
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: aruba
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: cucumber
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: pry
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: activesupport
93
+ name: pry
94
94
  description: Contract tests for rspec
95
95
  email:
96
96
  - gsmendoza@gmail.com