rspec-spies 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Appraisals CHANGED
@@ -1,7 +1,15 @@
1
1
  appraise "rspec-2-8" do
2
2
  gem "rspec", "~> 2.8.0"
3
+ gem "rspec-spies"
4
+ gem "rake"
5
+ gem "appraisal"
6
+ gem "jeweler"
3
7
  end
4
8
 
5
9
  appraise "rspec-2-11" do
6
10
  gem "rspec", "~> 2.11.0"
11
+ gem "rspec-spies"
12
+ gem "rake"
13
+ gem "appraisal"
14
+ gem "jeweler"
7
15
  end
data/Gemfile CHANGED
@@ -1,3 +1,10 @@
1
1
  source :rubygems
2
2
 
3
- gemspec
3
+ gem 'rspec', '~> 2.0'
4
+
5
+ group :development do
6
+ gem 'rake'
7
+ gem 'jeweler'
8
+ gem 'rdoc'
9
+ gem 'appraisal'
10
+ end
data/Gemfile.lock CHANGED
@@ -1,10 +1,3 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rspec-spies (2.1.1)
5
- rspec (~> 2.0)
6
- rspec-spies
7
-
8
1
  GEM
9
2
  remote: http://rubygems.org/
10
3
  specs:
@@ -36,4 +29,4 @@ DEPENDENCIES
36
29
  jeweler
37
30
  rake
38
31
  rdoc
39
- rspec-spies!
32
+ rspec (~> 2.0)
data/Rakefile CHANGED
@@ -13,13 +13,6 @@ Jeweler::Tasks.new do |gem|
13
13
  gem.email = "josh@technicalpickles.com"
14
14
  gem.homepage = "http://github.com/technicalpickles/rspec-spies"
15
15
  gem.authors = ["Joshua Nichols"]
16
-
17
- gem.add_runtime_dependency 'rspec', '~> 2.0'
18
-
19
- gem.add_development_dependency 'rake'
20
- gem.add_development_dependency 'jeweler'
21
- gem.add_development_dependency 'rdoc'
22
- gem.add_development_dependency 'appraisal'
23
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
24
17
  end
25
18
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.1.3
@@ -3,5 +3,8 @@
3
3
  source :rubygems
4
4
 
5
5
  gem "rspec", "~> 2.11.0"
6
+ gem "rspec-spies"
7
+ gem "rake"
8
+ gem "appraisal"
9
+ gem "jeweler"
6
10
 
7
- gemspec :path=>"../"
@@ -1,10 +1,3 @@
1
- PATH
2
- remote: /Users/jamesarosen/Projects/rspec-spies
3
- specs:
4
- rspec-spies (2.1.1)
5
- rspec (~> 2.0)
6
- rspec-spies
7
-
8
1
  GEM
9
2
  remote: http://rubygems.org/
10
3
  specs:
@@ -30,6 +23,9 @@ GEM
30
23
  rspec-expectations (2.11.2)
31
24
  diff-lcs (~> 1.1.3)
32
25
  rspec-mocks (2.11.2)
26
+ rspec-spies (2.1.2)
27
+ rspec (~> 2.0)
28
+ rspec-spies
33
29
 
34
30
  PLATFORMS
35
31
  ruby
@@ -38,6 +34,5 @@ DEPENDENCIES
38
34
  appraisal
39
35
  jeweler
40
36
  rake
41
- rdoc
42
37
  rspec (~> 2.11.0)
43
- rspec-spies!
38
+ rspec-spies
@@ -3,5 +3,8 @@
3
3
  source :rubygems
4
4
 
5
5
  gem "rspec", "~> 2.8.0"
6
+ gem "rspec-spies"
7
+ gem "rake"
8
+ gem "appraisal"
9
+ gem "jeweler"
6
10
 
7
- gemspec :path=>"../"
@@ -1,10 +1,3 @@
1
- PATH
2
- remote: /Users/jamesarosen/Projects/rspec-spies
3
- specs:
4
- rspec-spies (2.1.1)
5
- rspec (~> 2.0)
6
- rspec-spies
7
-
8
1
  GEM
9
2
  remote: http://rubygems.org/
10
3
  specs:
@@ -30,6 +23,9 @@ GEM
30
23
  rspec-expectations (2.8.0)
31
24
  diff-lcs (~> 1.1.2)
32
25
  rspec-mocks (2.8.0)
26
+ rspec-spies (2.1.2)
27
+ rspec (~> 2.0)
28
+ rspec-spies
33
29
 
34
30
  PLATFORMS
35
31
  ruby
@@ -38,6 +34,5 @@ DEPENDENCIES
38
34
  appraisal
39
35
  jeweler
40
36
  rake
41
- rdoc
42
37
  rspec (~> 2.8.0)
43
- rspec-spies!
38
+ rspec-spies
data/lib/rspec-spies.rb CHANGED
@@ -3,23 +3,33 @@ RSpec::Mocks::MethodDouble.class_eval do
3
3
  # override defining stubs to record the message was called.
4
4
  # there's only one line difference from upstream rspec, but can't change it without fully overriding
5
5
  def define_proxy_method
6
- method_name = @method_name
7
- visibility_for_method = "#{visibility} :#{method_name}"
8
- object_singleton_class.class_eval(<<-EOF, __FILE__, __LINE__)
9
- def #{method_name}(*args, &block)
10
- __mock_proxy.record_message_received :#{method_name}, *args, &block
11
- __mock_proxy.message_received :#{method_name}, *args, &block
12
- end
13
- #{visibility_for_method}
6
+ return if @method_is_proxied
7
+
8
+ object_singleton_class.class_eval <<-EOF, __FILE__, __LINE__ + 1
9
+ def #{@method_name}(*args, &block)
10
+ __mock_proxy.record_message_received :#{@method_name}, *args, &block
11
+ __mock_proxy.message_received :#{@method_name}, *args, &block
12
+ end
13
+ #{visibility_for_method}
14
14
  EOF
15
+ @method_is_proxied = true
16
+ end
17
+
18
+ def visibility_for_method
19
+ "#{visibility} :#{method_name}"
15
20
  end
16
21
  end
17
22
 
18
23
  require 'rspec/expectations'
19
24
  require 'rspec/matchers'
20
- argument_expectation_class = RSpec::Mocks.const_defined?(:ArgumentExpectation) ?
21
- RSpec::Mocks::ArgumentExpectation :
22
- RSpec::Mocks::ArgumentListMatcher
25
+
26
+ argument_expectation_class = begin
27
+ require 'rspec/mocks/argument_list_matcher'
28
+ RSpec::Mocks::ArgumentListMatcher
29
+ rescue LoadError
30
+ require 'rspec/mocks/argument_expectation'
31
+ RSpec::Mocks::ArgumentExpectation
32
+ end
23
33
 
24
34
  RSpec::Matchers.define :have_received do |method_name, args, block|
25
35
  match do |actual|
data/rspec-spies.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rspec-spies"
8
- s.version = "2.1.2"
8
+ s.version = "2.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Nichols"]
12
- s.date = "2012-09-05"
12
+ s.date = "2012-11-13"
13
13
  s.description = "test spies, for rspec"
14
14
  s.email = "josh@technicalpickles.com"
15
15
  s.extra_rdoc_files = [
@@ -37,21 +37,19 @@ Gem::Specification.new do |s|
37
37
  ]
38
38
  s.homepage = "http://github.com/technicalpickles/rspec-spies"
39
39
  s.require_paths = ["lib"]
40
- s.rubygems_version = "1.8.24"
40
+ s.rubygems_version = "1.8.10"
41
41
  s.summary = "rspec has gone without tests spies. no more!"
42
42
 
43
43
  if s.respond_to? :specification_version then
44
44
  s.specification_version = 3
45
45
 
46
46
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_runtime_dependency(%q<rspec-spies>, [">= 0"])
48
47
  s.add_runtime_dependency(%q<rspec>, ["~> 2.0"])
49
48
  s.add_development_dependency(%q<rake>, [">= 0"])
50
49
  s.add_development_dependency(%q<jeweler>, [">= 0"])
51
50
  s.add_development_dependency(%q<rdoc>, [">= 0"])
52
51
  s.add_development_dependency(%q<appraisal>, [">= 0"])
53
52
  else
54
- s.add_dependency(%q<rspec-spies>, [">= 0"])
55
53
  s.add_dependency(%q<rspec>, ["~> 2.0"])
56
54
  s.add_dependency(%q<rake>, [">= 0"])
57
55
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -59,7 +57,6 @@ Gem::Specification.new do |s|
59
57
  s.add_dependency(%q<appraisal>, [">= 0"])
60
58
  end
61
59
  else
62
- s.add_dependency(%q<rspec-spies>, [">= 0"])
63
60
  s.add_dependency(%q<rspec>, ["~> 2.0"])
64
61
  s.add_dependency(%q<rake>, [">= 0"])
65
62
  s.add_dependency(%q<jeweler>, [">= 0"])
metadata CHANGED
@@ -1,117 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rspec-spies
3
- version: !ruby/object:Gem::Version
4
- hash: 15
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.3
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 1
9
- - 2
10
- version: 2.1.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Joshua Nichols
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-09-05 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rspec-spies
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
12
+ date: 2012-11-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
35
15
  name: rspec
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
16
+ requirement: &70355083921100 !ruby/object:Gem::Requirement
38
17
  none: false
39
- requirements:
18
+ requirements:
40
19
  - - ~>
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 2
45
- - 0
46
- version: "2.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.0'
47
22
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rake
51
23
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
24
+ version_requirements: *70355083921100
25
+ - !ruby/object:Gem::Dependency
26
+ name: rake
27
+ requirement: &70355083920560 !ruby/object:Gem::Requirement
53
28
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
61
33
  type: :development
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: jeweler
65
34
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
35
+ version_requirements: *70355083920560
36
+ - !ruby/object:Gem::Dependency
37
+ name: jeweler
38
+ requirement: &70355083920040 !ruby/object:Gem::Requirement
67
39
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
75
44
  type: :development
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: rdoc
79
45
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
46
+ version_requirements: *70355083920040
47
+ - !ruby/object:Gem::Dependency
48
+ name: rdoc
49
+ requirement: &70355083919380 !ruby/object:Gem::Requirement
81
50
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
89
55
  type: :development
90
- version_requirements: *id005
91
- - !ruby/object:Gem::Dependency
92
- name: appraisal
93
56
  prerelease: false
94
- requirement: &id006 !ruby/object:Gem::Requirement
57
+ version_requirements: *70355083919380
58
+ - !ruby/object:Gem::Dependency
59
+ name: appraisal
60
+ requirement: &70355083918660 !ruby/object:Gem::Requirement
95
61
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- hash: 3
100
- segments:
101
- - 0
102
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
103
66
  type: :development
104
- version_requirements: *id006
67
+ prerelease: false
68
+ version_requirements: *70355083918660
105
69
  description: test spies, for rspec
106
70
  email: josh@technicalpickles.com
107
71
  executables: []
108
-
109
72
  extensions: []
110
-
111
- extra_rdoc_files:
73
+ extra_rdoc_files:
112
74
  - LICENSE
113
75
  - README.rdoc
114
- files:
76
+ files:
115
77
  - .document
116
78
  - Appraisals
117
79
  - Gemfile
@@ -131,36 +93,26 @@ files:
131
93
  - spec/spec_helper.rb
132
94
  homepage: http://github.com/technicalpickles/rspec-spies
133
95
  licenses: []
134
-
135
96
  post_install_message:
136
97
  rdoc_options: []
137
-
138
- require_paths:
98
+ require_paths:
139
99
  - lib
140
- required_ruby_version: !ruby/object:Gem::Requirement
100
+ required_ruby_version: !ruby/object:Gem::Requirement
141
101
  none: false
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- hash: 3
146
- segments:
147
- - 0
148
- version: "0"
149
- required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
107
  none: false
151
- requirements:
152
- - - ">="
153
- - !ruby/object:Gem::Version
154
- hash: 3
155
- segments:
156
- - 0
157
- version: "0"
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
158
112
  requirements: []
159
-
160
113
  rubyforge_project:
161
- rubygems_version: 1.8.24
114
+ rubygems_version: 1.8.10
162
115
  signing_key:
163
116
  specification_version: 3
164
117
  summary: rspec has gone without tests spies. no more!
165
118
  test_files: []
166
-