rspec-rails 3.5.0.beta4 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe6c556ed366e640bb5f0a4aa918fcc872020904
4
- data.tar.gz: 1136962bda7a5bd265570b16bd51589e0f28156b
3
+ metadata.gz: 4c9ab212b670eb30b23bb4fe4f1ad9942e1e5a49
4
+ data.tar.gz: d681844aab4f04bd2afbcb2d88100cd6695880bb
5
5
  SHA512:
6
- metadata.gz: bba5f656f01beb05846a821080d4124a8150e99a531bc9407982543ee93e6eef03c48a2d9430bf3169f1a466d4bd20837072d673ebcf4da0d3d01836ee08e97c
7
- data.tar.gz: 0e9061fcd609bbdd7031bfe879e10b9c1001b5669fd5f0d5bf72e7229ec021202b2e2f53c466df2ccaa820090608216a443228a461c24e111069a9558691053a
6
+ metadata.gz: d81b8460f88c529b94ff1d0c16d84ea6160f574828b494798350224fa7d041650e49b9bedb7369fb0c0fc936d9cfce66f6566fe43247a7f3e74fdc5103a6571d
7
+ data.tar.gz: 1938fd6fb95ae3ddf05898ac2847e090ec9ae4ce40906ec0dbc92d5eeb283354358f69f303705baa9fe949641645e9b736d824ab6a67b112b15e5c622fdbbac8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,5 +1,7 @@
1
- ### 3.5 development
2
- [Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.5.0.beta4...master)
1
+ ### 3.5.0 / 2016-07-01
2
+ [Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.5.0.beta4...v3.5.0)
3
+
4
+ **No user facing changes since beta4**
3
5
 
4
6
  ### 3.5.0.beta4 / 2016-06-05
5
7
  [Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.5.0.beta3...v3.5.0.beta4)
@@ -50,7 +52,7 @@ Bug fixes:
50
52
 
51
53
  Enhancements:
52
54
 
53
- * Add a `---singularize` option for the feature spec generator (Felicity McCabe,
55
+ * Add a `--singularize` option for the feature spec generator (Felicity McCabe,
54
56
  #1503)
55
57
  * Prevent leaking TestUnit methods in Rails 4+ (Fernando Seror Garcia, #1512)
56
58
  * Add support for Rails 5 (Sam Phippen, #1492)
@@ -41,11 +41,11 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
41
41
  describe "GET #index" do
42
42
  it "assigns all <%= table_name.pluralize %> as @<%= table_name.pluralize %>" do
43
43
  <%= file_name %> = <%= class_name %>.create! valid_attributes
44
- <% if RUBY_VERSION < '1.9.3' -%>
44
+ <% if RUBY_VERSION < '1.9.3' -%>
45
45
  get :index, {}, valid_session
46
- <% else -%>
46
+ <% else -%>
47
47
  get :index, params: {}, session: valid_session
48
- <% end -%>
48
+ <% end -%>
49
49
  expect(assigns(:<%= table_name %>)).to eq([<%= file_name %>])
50
50
  end
51
51
  end
@@ -54,22 +54,22 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
54
54
  describe "GET #show" do
55
55
  it "assigns the requested <%= ns_file_name %> as @<%= ns_file_name %>" do
56
56
  <%= file_name %> = <%= class_name %>.create! valid_attributes
57
- <% if RUBY_VERSION < '1.9.3' -%>
57
+ <% if RUBY_VERSION < '1.9.3' -%>
58
58
  get :show, {:id => <%= file_name %>.to_param}, valid_session
59
- <% else -%>
59
+ <% else -%>
60
60
  get :show, params: {id: <%= file_name %>.to_param}, session: valid_session
61
- <% end -%>
61
+ <% end -%>
62
62
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
63
63
  end
64
64
  end
65
65
 
66
66
  describe "GET #new" do
67
67
  it "assigns a new <%= ns_file_name %> as @<%= ns_file_name %>" do
68
- <% if RUBY_VERSION < '1.9.3' -%>
68
+ <% if RUBY_VERSION < '1.9.3' -%>
69
69
  get :new, {}, valid_session
70
- <% else -%>
70
+ <% else -%>
71
71
  get :new, params: {}, session: valid_session
72
- <% end -%>
72
+ <% end -%>
73
73
  expect(assigns(:<%= ns_file_name %>)).to be_a_new(<%= class_name %>)
74
74
  end
75
75
  end
@@ -77,11 +77,11 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
77
77
  describe "GET #edit" do
78
78
  it "assigns the requested <%= ns_file_name %> as @<%= ns_file_name %>" do
79
79
  <%= file_name %> = <%= class_name %>.create! valid_attributes
80
- <% if RUBY_VERSION < '1.9.3' -%>
80
+ <% if RUBY_VERSION < '1.9.3' -%>
81
81
  get :edit, {:id => <%= file_name %>.to_param}, valid_session
82
- <% else -%>
82
+ <% else -%>
83
83
  get :edit, params: {id: <%= file_name %>.to_param}, session: valid_session
84
- <% end -%>
84
+ <% end -%>
85
85
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
86
86
  end
87
87
  end
@@ -90,50 +90,50 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
90
90
  context "with valid params" do
91
91
  it "creates a new <%= class_name %>" do
92
92
  expect {
93
- <% if RUBY_VERSION < '1.9.3' -%>
93
+ <% if RUBY_VERSION < '1.9.3' -%>
94
94
  post :create, {:<%= ns_file_name %> => valid_attributes}, valid_session
95
- <% else -%>
95
+ <% else -%>
96
96
  post :create, params: {<%= ns_file_name %>: valid_attributes}, session: valid_session
97
- <% end -%>
97
+ <% end -%>
98
98
  }.to change(<%= class_name %>, :count).by(1)
99
99
  end
100
100
 
101
101
  it "assigns a newly created <%= ns_file_name %> as @<%= ns_file_name %>" do
102
- <% if RUBY_VERSION < '1.9.3' -%>
102
+ <% if RUBY_VERSION < '1.9.3' -%>
103
103
  post :create, {:<%= ns_file_name %> => valid_attributes}, valid_session
104
- <% else -%>
104
+ <% else -%>
105
105
  post :create, params: {<%= ns_file_name %>: valid_attributes}, session: valid_session
106
- <% end -%>
106
+ <% end -%>
107
107
  expect(assigns(:<%= ns_file_name %>)).to be_a(<%= class_name %>)
108
108
  expect(assigns(:<%= ns_file_name %>)).to be_persisted
109
109
  end
110
110
 
111
111
  it "redirects to the created <%= ns_file_name %>" do
112
- <% if RUBY_VERSION < '1.9.3' -%>
112
+ <% if RUBY_VERSION < '1.9.3' -%>
113
113
  post :create, {:<%= ns_file_name %> => valid_attributes}, valid_session
114
- <% else -%>
114
+ <% else -%>
115
115
  post :create, params: {<%= ns_file_name %>: valid_attributes}, session: valid_session
116
- <% end -%>
116
+ <% end -%>
117
117
  expect(response).to redirect_to(<%= class_name %>.last)
118
118
  end
119
119
  end
120
120
 
121
121
  context "with invalid params" do
122
122
  it "assigns a newly created but unsaved <%= ns_file_name %> as @<%= ns_file_name %>" do
123
- <% if RUBY_VERSION < '1.9.3' -%>
123
+ <% if RUBY_VERSION < '1.9.3' -%>
124
124
  post :create, {:<%= ns_file_name %> => invalid_attributes}, valid_session
125
- <% else -%>
125
+ <% else -%>
126
126
  post :create, params: {<%= ns_file_name %>: invalid_attributes}, session: valid_session
127
- <% end -%>
127
+ <% end -%>
128
128
  expect(assigns(:<%= ns_file_name %>)).to be_a_new(<%= class_name %>)
129
129
  end
130
130
 
131
131
  it "re-renders the 'new' template" do
132
- <% if RUBY_VERSION < '1.9.3' -%>
132
+ <% if RUBY_VERSION < '1.9.3' -%>
133
133
  post :create, {:<%= ns_file_name %> => invalid_attributes}, valid_session
134
- <% else -%>
134
+ <% else -%>
135
135
  post :create, params: {<%= ns_file_name %>: invalid_attributes}, session: valid_session
136
- <% end -%>
136
+ <% end -%>
137
137
  expect(response).to render_template("new")
138
138
  end
139
139
  end
@@ -147,32 +147,32 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
147
147
 
148
148
  it "updates the requested <%= ns_file_name %>" do
149
149
  <%= file_name %> = <%= class_name %>.create! valid_attributes
150
- <% if RUBY_VERSION < '1.9.3' -%>
150
+ <% if RUBY_VERSION < '1.9.3' -%>
151
151
  put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => new_attributes}, valid_session
152
- <% else -%>
152
+ <% else -%>
153
153
  put :update, params: {id: <%= file_name %>.to_param, <%= ns_file_name %>: new_attributes}, session: valid_session
154
- <% end -%>
154
+ <% end -%>
155
155
  <%= file_name %>.reload
156
156
  skip("Add assertions for updated state")
157
157
  end
158
158
 
159
159
  it "assigns the requested <%= ns_file_name %> as @<%= ns_file_name %>" do
160
160
  <%= file_name %> = <%= class_name %>.create! valid_attributes
161
- <% if RUBY_VERSION < '1.9.3' -%>
161
+ <% if RUBY_VERSION < '1.9.3' -%>
162
162
  put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => valid_attributes}, valid_session
163
- <% else -%>
163
+ <% else -%>
164
164
  put :update, params: {id: <%= file_name %>.to_param, <%= ns_file_name %>: valid_attributes}, session: valid_session
165
- <% end -%>
165
+ <% end -%>
166
166
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
167
167
  end
168
168
 
169
169
  it "redirects to the <%= ns_file_name %>" do
170
170
  <%= file_name %> = <%= class_name %>.create! valid_attributes
171
- <% if RUBY_VERSION < '1.9.3' -%>
171
+ <% if RUBY_VERSION < '1.9.3' -%>
172
172
  put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => valid_attributes}, valid_session
173
- <% else -%>
173
+ <% else -%>
174
174
  put :update, params: {id: <%= file_name %>.to_param, <%= ns_file_name %>: valid_attributes}, session: valid_session
175
- <% end -%>
175
+ <% end -%>
176
176
  expect(response).to redirect_to(<%= file_name %>)
177
177
  end
178
178
  end
@@ -180,21 +180,21 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
180
180
  context "with invalid params" do
181
181
  it "assigns the <%= ns_file_name %> as @<%= ns_file_name %>" do
182
182
  <%= file_name %> = <%= class_name %>.create! valid_attributes
183
- <% if RUBY_VERSION < '1.9.3' -%>
183
+ <% if RUBY_VERSION < '1.9.3' -%>
184
184
  put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => invalid_attributes}, valid_session
185
- <% else -%>
185
+ <% else -%>
186
186
  put :update, params: {id: <%= file_name %>.to_param, <%= ns_file_name %>: invalid_attributes}, session: valid_session
187
- <% end -%>
187
+ <% end -%>
188
188
  expect(assigns(:<%= ns_file_name %>)).to eq(<%= file_name %>)
189
189
  end
190
190
 
191
191
  it "re-renders the 'edit' template" do
192
192
  <%= file_name %> = <%= class_name %>.create! valid_attributes
193
- <% if RUBY_VERSION < '1.9.3' -%>
193
+ <% if RUBY_VERSION < '1.9.3' -%>
194
194
  put :update, {:id => <%= file_name %>.to_param, :<%= ns_file_name %> => invalid_attributes}, valid_session
195
- <% else -%>
195
+ <% else -%>
196
196
  put :update, params: {id: <%= file_name %>.to_param, <%= ns_file_name %>: invalid_attributes}, session: valid_session
197
- <% end -%>
197
+ <% end -%>
198
198
  expect(response).to render_template("edit")
199
199
  end
200
200
  end
@@ -204,21 +204,21 @@ RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:control
204
204
  it "destroys the requested <%= ns_file_name %>" do
205
205
  <%= file_name %> = <%= class_name %>.create! valid_attributes
206
206
  expect {
207
- <% if RUBY_VERSION < '1.9.3' -%>
207
+ <% if RUBY_VERSION < '1.9.3' -%>
208
208
  delete :destroy, {:id => <%= file_name %>.to_param}, valid_session
209
- <% else -%>
209
+ <% else -%>
210
210
  delete :destroy, params: {id: <%= file_name %>.to_param}, session: valid_session
211
- <% end -%>
211
+ <% end -%>
212
212
  }.to change(<%= class_name %>, :count).by(-1)
213
213
  end
214
214
 
215
215
  it "redirects to the <%= table_name %> list" do
216
216
  <%= file_name %> = <%= class_name %>.create! valid_attributes
217
- <% if RUBY_VERSION < '1.9.3' -%>
217
+ <% if RUBY_VERSION < '1.9.3' -%>
218
218
  delete :destroy, {:id => <%= file_name %>.to_param}, valid_session
219
- <% else -%>
219
+ <% else -%>
220
220
  delete :destroy, params: {id: <%= file_name %>.to_param}, session: valid_session
221
- <% end -%>
221
+ <% end -%>
222
222
  expect(response).to redirect_to(<%= index_helper %>_url)
223
223
  end
224
224
  end
@@ -7,7 +7,7 @@ module RSpec
7
7
  def self.initialize_activerecord_configuration(config)
8
8
  config.before :suite do
9
9
  # This allows dynamic columns etc to be used on ActiveRecord models when creating instance_doubles
10
- if defined?(ActiveRecord) && defined?(::RSpec::Mocks)
10
+ if defined?(ActiveRecord) && defined?(ActiveRecord::Base) && defined?(::RSpec::Mocks)
11
11
  ::RSpec::Mocks.configuration.when_declaring_verifying_double do |possible_model|
12
12
  target = possible_model.target
13
13
 
@@ -47,6 +47,7 @@ module RSpec
47
47
  config.include RSpec::Rails::RoutingExampleGroup, :type => :routing
48
48
  config.include RSpec::Rails::ViewExampleGroup, :type => :view
49
49
  config.include RSpec::Rails::FeatureExampleGroup, :type => :feature
50
+ config.include RSpec::Rails::Matchers
50
51
  end
51
52
 
52
53
  # @private
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec Rails.
4
4
  module Version
5
5
  # Current version of RSpec Rails, in semantic versioning format.
6
- STRING = '3.5.0.beta4'
6
+ STRING = '3.5.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0.beta4
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chelimsky
@@ -44,7 +44,7 @@ cert_chain:
44
44
  ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
45
45
  F3MdtaDehhjC
46
46
  -----END CERTIFICATE-----
47
- date: 2016-06-05 00:00:00.000000000 Z
47
+ date: 2016-07-01 00:00:00.000000000 Z
48
48
  dependencies:
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: activesupport
@@ -92,58 +92,58 @@ dependencies:
92
92
  name: rspec-core
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '='
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 3.5.0.beta4
97
+ version: 3.5.0
98
98
  type: :runtime
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '='
102
+ - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 3.5.0.beta4
104
+ version: 3.5.0
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: rspec-expectations
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '='
109
+ - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: 3.5.0.beta4
111
+ version: 3.5.0
112
112
  type: :runtime
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '='
116
+ - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: 3.5.0.beta4
118
+ version: 3.5.0
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: rspec-mocks
121
121
  requirement: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - '='
123
+ - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: 3.5.0.beta4
125
+ version: 3.5.0
126
126
  type: :runtime
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '='
130
+ - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: 3.5.0.beta4
132
+ version: 3.5.0
133
133
  - !ruby/object:Gem::Dependency
134
134
  name: rspec-support
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '='
137
+ - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: 3.5.0.beta4
139
+ version: 3.5.0
140
140
  type: :runtime
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - '='
144
+ - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: 3.5.0.beta4
146
+ version: 3.5.0
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: cucumber
149
149
  requirement: !ruby/object:Gem::Requirement
@@ -286,12 +286,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
286
286
  version: '0'
287
287
  required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  requirements:
289
- - - ">"
289
+ - - ">="
290
290
  - !ruby/object:Gem::Version
291
- version: 1.3.1
291
+ version: '0'
292
292
  requirements: []
293
293
  rubyforge_project:
294
- rubygems_version: 2.2.2
294
+ rubygems_version: 2.5.1
295
295
  signing_key:
296
296
  specification_version: 4
297
297
  summary: RSpec for Rails
metadata.gz.sig CHANGED
Binary file