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

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.5
1
+ 2.0.0.beta.6
@@ -127,14 +127,14 @@ module Rspec
127
127
  def add_negative_expectation(error_generator, expectation_ordering, expected_from, &implementation)
128
128
  configure_method
129
129
  expectation = NegativeMessageExpectation.new(error_generator, expectation_ordering, expected_from, @method_name, implementation)
130
- expectations << expectation
130
+ expectations.unshift expectation
131
131
  expectation
132
132
  end
133
133
 
134
134
  def add_stub(error_generator, expectation_ordering, expected_from, opts={}, &implementation)
135
135
  configure_method
136
136
  stub = MessageExpectation.new(error_generator, expectation_ordering, expected_from, @method_name, nil, :any, opts, &implementation)
137
- stubs << stub
137
+ stubs.unshift stub
138
138
  stub
139
139
  end
140
140
 
@@ -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.5"
8
+ s.version = "2.0.0.beta.6"
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-04}
12
+ s.date = %q{2010-04-12}
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 = [
@@ -97,7 +97,7 @@ Gem::Specification.new do |s|
97
97
  s.homepage = %q{http://github.com/rspec/mocks}
98
98
  s.post_install_message = %q{**************************************************
99
99
 
100
- Thank you for installing rspec-mocks-2.0.0.beta.5
100
+ Thank you for installing rspec-mocks-2.0.0.beta.6
101
101
 
102
102
  This is beta software. If you are looking
103
103
  for a supported production release, please
@@ -109,7 +109,7 @@ Gem::Specification.new do |s|
109
109
  s.require_paths = ["lib"]
110
110
  s.rubyforge_project = %q{rspec}
111
111
  s.rubygems_version = %q{1.3.6}
112
- s.summary = %q{rspec-mocks-2.0.0.beta.5}
112
+ s.summary = %q{rspec-mocks-2.0.0.beta.6}
113
113
  s.test_files = [
114
114
  "spec/rspec/mocks/and_yield_spec.rb",
115
115
  "spec/rspec/mocks/any_number_of_times_spec.rb",
@@ -160,15 +160,15 @@ Gem::Specification.new do |s|
160
160
  s.specification_version = 3
161
161
 
162
162
  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.5"])
164
- s.add_development_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.5"])
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
165
  else
166
- s.add_dependency(%q<rspec-core>, ["= 2.0.0.beta.5"])
167
- s.add_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.5"])
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
168
  end
169
169
  else
170
- s.add_dependency(%q<rspec-core>, ["= 2.0.0.beta.5"])
171
- s.add_dependency(%q<rspec-expectations>, ["= 2.0.0.beta.5"])
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
172
  end
173
173
  end
174
174
 
@@ -67,7 +67,7 @@ module Rspec
67
67
 
68
68
  it "should return values in order to consecutive calls" do
69
69
  return_values = ["1",2,Object.new]
70
- @instance.stub(:msg).and_return(return_values[0],return_values[1],return_values[2])
70
+ @instance.stub(:msg).and_return(*return_values)
71
71
  @instance.msg.should == return_values[0]
72
72
  @instance.msg.should == return_values[1]
73
73
  @instance.msg.should == return_values[2]
@@ -130,10 +130,16 @@ module Rspec
130
130
  end.should throw_symbol(:up)
131
131
  end
132
132
 
133
- it "should override a pre-existing stub" do
133
+ it "should override a pre-existing method" do
134
134
  @stub.stub(:existing_instance_method).and_return(:updated_stub_value)
135
135
  @stub.existing_instance_method.should == :updated_stub_value
136
136
  end
137
+
138
+ it "should override a pre-existing stub" do
139
+ @stub.stub(:foo) { 'bar' }
140
+ @stub.stub(:foo) { 'baz' }
141
+ @stub.foo.should == 'baz'
142
+ end
137
143
 
138
144
  it "should limit " do
139
145
  @stub.stub(:foo).with("bar")
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - beta
10
- - 5
11
- version: 2.0.0.beta.5
10
+ - 6
11
+ version: 2.0.0.beta.6
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-04 00:00:00 -03:00
20
+ date: 2010-04-12 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
- - 5
36
- version: 2.0.0.beta.5
35
+ - 6
36
+ version: 2.0.0.beta.6
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
- - 5
52
- version: 2.0.0.beta.5
51
+ - 6
52
+ version: 2.0.0.beta.6
53
53
  type: :development
54
54
  version_requirements: *id002
55
55
  description: Rspec's 'test double' framework, with support for stubbing and mocking
@@ -145,7 +145,7 @@ licenses: []
145
145
  post_install_message: |
146
146
  **************************************************
147
147
 
148
- Thank you for installing rspec-mocks-2.0.0.beta.5
148
+ Thank you for installing rspec-mocks-2.0.0.beta.6
149
149
 
150
150
  This is beta software. If you are looking
151
151
  for a supported production release, please
@@ -179,7 +179,7 @@ rubyforge_project: rspec
179
179
  rubygems_version: 1.3.6
180
180
  signing_key:
181
181
  specification_version: 3
182
- summary: rspec-mocks-2.0.0.beta.5
182
+ summary: rspec-mocks-2.0.0.beta.6
183
183
  test_files:
184
184
  - spec/rspec/mocks/and_yield_spec.rb
185
185
  - spec/rspec/mocks/any_number_of_times_spec.rb