rspec-mocks 2.0.0.beta.6 → 2.0.0.beta.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta.6
1
+ 2.0.0.beta.7
@@ -57,8 +57,10 @@ module Rspec
57
57
  def configure_method
58
58
  $rspec_mocks.add(@object) if $rspec_mocks
59
59
  warn_if_nil_class
60
- stash_original_method
61
- define_proxy_method
60
+ unless @stashed
61
+ stash_original_method
62
+ define_proxy_method
63
+ end
62
64
  end
63
65
 
64
66
  def stash_original_method
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rspec-mocks}
8
- s.version = "2.0.0.beta.6"
8
+ s.version = "2.0.0.beta.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Chelimsky", "Chad Humphries"]
12
- s.date = %q{2010-04-12}
12
+ s.date = %q{2010-04-17}
13
13
  s.description = %q{Rspec's 'test double' framework, with support for stubbing and mocking}
14
14
  s.email = %q{dchelimsky@gmail.com;chad.humphries@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -85,6 +85,7 @@ Gem::Specification.new do |s|
85
85
  "spec/rspec/mocks/passing_argument_matchers_spec.rb",
86
86
  "spec/rspec/mocks/precise_counts_spec.rb",
87
87
  "spec/rspec/mocks/record_messages_spec.rb",
88
+ "spec/rspec/mocks/stash_spec.rb",
88
89
  "spec/rspec/mocks/stub_chain_spec.rb",
89
90
  "spec/rspec/mocks/stub_implementation_spec.rb",
90
91
  "spec/rspec/mocks/stub_spec.rb",
@@ -97,7 +98,7 @@ Gem::Specification.new do |s|
97
98
  s.homepage = %q{http://github.com/rspec/mocks}
98
99
  s.post_install_message = %q{**************************************************
99
100
 
100
- Thank you for installing rspec-mocks-2.0.0.beta.6
101
+ Thank you for installing rspec-mocks-2.0.0.beta.7
101
102
 
102
103
  This is beta software. If you are looking
103
104
  for a supported production release, please
@@ -109,7 +110,7 @@ Gem::Specification.new do |s|
109
110
  s.require_paths = ["lib"]
110
111
  s.rubyforge_project = %q{rspec}
111
112
  s.rubygems_version = %q{1.3.6}
112
- s.summary = %q{rspec-mocks-2.0.0.beta.6}
113
+ s.summary = %q{rspec-mocks-2.0.0.beta.7}
113
114
  s.test_files = [
114
115
  "spec/rspec/mocks/and_yield_spec.rb",
115
116
  "spec/rspec/mocks/any_number_of_times_spec.rb",
@@ -146,6 +147,7 @@ Gem::Specification.new do |s|
146
147
  "spec/rspec/mocks/passing_argument_matchers_spec.rb",
147
148
  "spec/rspec/mocks/precise_counts_spec.rb",
148
149
  "spec/rspec/mocks/record_messages_spec.rb",
150
+ "spec/rspec/mocks/stash_spec.rb",
149
151
  "spec/rspec/mocks/stub_chain_spec.rb",
150
152
  "spec/rspec/mocks/stub_implementation_spec.rb",
151
153
  "spec/rspec/mocks/stub_spec.rb",
@@ -160,15 +162,15 @@ Gem::Specification.new do |s|
160
162
  s.specification_version = 3
161
163
 
162
164
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
163
- s.add_development_dependency(%q<rspec-core>, ["= 2.0.0.beta.6"])
164
- s.add_development_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.6"])
165
+ s.add_development_dependency(%q<rspec-core>, ["= 2.0.0.beta.7"])
166
+ s.add_development_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.7"])
165
167
  else
166
- s.add_dependency(%q<rspec-core>, ["= 2.0.0.beta.6"])
167
- s.add_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.6"])
168
+ s.add_dependency(%q<rspec-core>, ["= 2.0.0.beta.7"])
169
+ s.add_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.7"])
168
170
  end
169
171
  else
170
- s.add_dependency(%q<rspec-core>, ["= 2.0.0.beta.6"])
171
- s.add_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.6"])
172
+ s.add_dependency(%q<rspec-core>, ["= 2.0.0.beta.7"])
173
+ s.add_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.7"])
172
174
  end
173
175
  end
174
176
 
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ module Rspec
4
+ module Mocks
5
+
6
+ describe "only stashing the original method" do
7
+ let(:klass) do
8
+ Class.new do
9
+ def self.foo(arg)
10
+ :original_value
11
+ end
12
+ end
13
+ end
14
+ it "should keep the original method intact after multiple expectations are added on the same method" do
15
+ klass.should_receive(:foo).with(:fizbaz).and_return(:wowwow)
16
+ klass.should_receive(:foo).with(:bazbar).and_return(:okay)
17
+
18
+ klass.foo(:fizbaz)
19
+ klass.foo(:bazbar)
20
+ klass.rspec_verify
21
+
22
+ klass.rspec_reset
23
+ klass.foo(:yeah).should equal(:original_value)
24
+ end
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - beta
10
- - 6
11
- version: 2.0.0.beta.6
10
+ - 7
11
+ version: 2.0.0.beta.7
12
12
  platform: ruby
13
13
  authors:
14
14
  - David Chelimsky
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-04-12 00:00:00 -05:00
20
+ date: 2010-04-17 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -32,8 +32,8 @@ dependencies:
32
32
  - 0
33
33
  - 0
34
34
  - beta
35
- - 6
36
- version: 2.0.0.beta.6
35
+ - 7
36
+ version: 2.0.0.beta.7
37
37
  type: :development
38
38
  version_requirements: *id001
39
39
  - !ruby/object:Gem::Dependency
@@ -48,8 +48,8 @@ dependencies:
48
48
  - 0
49
49
  - 0
50
50
  - beta
51
- - 6
52
- version: 2.0.0.beta.6
51
+ - 7
52
+ version: 2.0.0.beta.7
53
53
  type: :development
54
54
  version_requirements: *id002
55
55
  description: Rspec's 'test double' framework, with support for stubbing and mocking
@@ -130,6 +130,7 @@ files:
130
130
  - spec/rspec/mocks/passing_argument_matchers_spec.rb
131
131
  - spec/rspec/mocks/precise_counts_spec.rb
132
132
  - spec/rspec/mocks/record_messages_spec.rb
133
+ - spec/rspec/mocks/stash_spec.rb
133
134
  - spec/rspec/mocks/stub_chain_spec.rb
134
135
  - spec/rspec/mocks/stub_implementation_spec.rb
135
136
  - spec/rspec/mocks/stub_spec.rb
@@ -145,7 +146,7 @@ licenses: []
145
146
  post_install_message: |
146
147
  **************************************************
147
148
 
148
- Thank you for installing rspec-mocks-2.0.0.beta.6
149
+ Thank you for installing rspec-mocks-2.0.0.beta.7
149
150
 
150
151
  This is beta software. If you are looking
151
152
  for a supported production release, please
@@ -179,7 +180,7 @@ rubyforge_project: rspec
179
180
  rubygems_version: 1.3.6
180
181
  signing_key:
181
182
  specification_version: 3
182
- summary: rspec-mocks-2.0.0.beta.6
183
+ summary: rspec-mocks-2.0.0.beta.7
183
184
  test_files:
184
185
  - spec/rspec/mocks/and_yield_spec.rb
185
186
  - spec/rspec/mocks/any_number_of_times_spec.rb
@@ -216,6 +217,7 @@ test_files:
216
217
  - spec/rspec/mocks/passing_argument_matchers_spec.rb
217
218
  - spec/rspec/mocks/precise_counts_spec.rb
218
219
  - spec/rspec/mocks/record_messages_spec.rb
220
+ - spec/rspec/mocks/stash_spec.rb
219
221
  - spec/rspec/mocks/stub_chain_spec.rb
220
222
  - spec/rspec/mocks/stub_implementation_spec.rb
221
223
  - spec/rspec/mocks/stub_spec.rb