rspec-rails 2.99.0 → 3.1.0
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.
- checksums.yaml +6 -14
- checksums.yaml.gz.sig +1 -0
- data/.yardopts +1 -1
- data/Capybara.md +1 -3
- data/Changelog.md +148 -11
- data/License.txt +1 -0
- data/README.md +202 -105
- data/lib/generators/rspec/controller/controller_generator.rb +1 -0
- data/lib/generators/rspec/controller/templates/controller_spec.rb +5 -5
- data/lib/generators/rspec/controller/templates/view_spec.rb +2 -2
- data/lib/generators/rspec/feature/feature_generator.rb +16 -0
- data/lib/generators/rspec/feature/templates/feature_spec.rb +5 -0
- data/lib/generators/rspec/helper/helper_generator.rb +1 -0
- data/lib/generators/rspec/helper/templates/helper_spec.rb +2 -2
- data/lib/generators/rspec/install/install_generator.rb +44 -5
- data/lib/generators/rspec/install/templates/spec/{spec_helper.rb.tt → rails_helper.rb} +19 -28
- data/lib/generators/rspec/integration/integration_generator.rb +1 -12
- data/lib/generators/rspec/integration/templates/request_spec.rb +3 -8
- data/lib/generators/rspec/job/job_generator.rb +12 -0
- data/lib/generators/rspec/job/templates/job_spec.rb.erb +7 -0
- data/lib/generators/rspec/mailer/mailer_generator.rb +1 -0
- data/lib/generators/rspec/mailer/templates/mailer_spec.rb +6 -6
- data/lib/generators/rspec/model/model_generator.rb +19 -5
- data/lib/generators/rspec/model/templates/fixtures.yml +1 -1
- data/lib/generators/rspec/model/templates/model_spec.rb +2 -2
- data/lib/generators/rspec/observer/observer_generator.rb +1 -0
- data/lib/generators/rspec/observer/templates/observer_spec.rb +2 -2
- data/lib/generators/rspec/scaffold/scaffold_generator.rb +108 -135
- data/lib/generators/rspec/scaffold/templates/controller_spec.rb +34 -39
- data/lib/generators/rspec/scaffold/templates/edit_spec.rb +5 -13
- data/lib/generators/rspec/scaffold/templates/index_spec.rb +3 -10
- data/lib/generators/rspec/scaffold/templates/new_spec.rb +6 -14
- data/lib/generators/rspec/scaffold/templates/routing_spec.rb +9 -9
- data/lib/generators/rspec/scaffold/templates/show_spec.rb +4 -11
- data/lib/generators/rspec/view/templates/view_spec.rb +2 -2
- data/lib/generators/rspec/view/view_generator.rb +1 -0
- data/lib/generators/rspec.rb +16 -6
- data/lib/rspec/rails/adapters.rb +33 -35
- data/lib/rspec/rails/configuration.rb +97 -0
- data/lib/rspec/rails/example/controller_example_group.rb +173 -159
- data/lib/rspec/rails/example/feature_example_group.rb +25 -20
- data/lib/rspec/rails/example/helper_example_group.rb +27 -26
- data/lib/rspec/rails/example/mailer_example_group.rb +29 -14
- data/lib/rspec/rails/example/model_example_group.rb +7 -7
- data/lib/rspec/rails/example/rails_example_group.rb +1 -0
- data/lib/rspec/rails/example/request_example_group.rb +19 -17
- data/lib/rspec/rails/example/routing_example_group.rb +40 -39
- data/lib/rspec/rails/example/view_example_group.rb +140 -137
- data/lib/rspec/rails/example.rb +0 -33
- data/lib/rspec/rails/extensions/active_record/proxy.rb +0 -1
- data/lib/rspec/rails/extensions.rb +0 -1
- data/lib/rspec/rails/feature_check.rb +35 -0
- data/lib/rspec/rails/fixture_support.rb +5 -12
- data/lib/rspec/rails/matchers/be_a_new.rb +67 -62
- data/lib/rspec/rails/matchers/be_new_record.rb +23 -21
- data/lib/rspec/rails/matchers/be_valid.rb +41 -33
- data/lib/rspec/rails/matchers/have_http_status.rb +361 -0
- data/lib/rspec/rails/matchers/have_rendered.rb +35 -31
- data/lib/rspec/rails/matchers/redirect_to.rb +30 -29
- data/lib/rspec/rails/matchers/relation_match_array.rb +1 -1
- data/lib/rspec/rails/matchers/routing_matchers.rb +104 -94
- data/lib/rspec/rails/matchers.rb +7 -4
- data/lib/rspec/rails/tasks/rspec.rake +1 -1
- data/lib/rspec/rails/vendor/capybara.rb +2 -33
- data/lib/rspec/rails/version.rb +3 -1
- data/lib/rspec/rails/view_assigns.rb +18 -18
- data/lib/rspec/rails/view_rendering.rb +20 -45
- data/lib/rspec/rails.rb +2 -13
- data/lib/rspec-rails.rb +4 -1
- data.tar.gz.sig +0 -0
- metadata +80 -99
- metadata.gz.sig +3 -0
- data/lib/autotest/rails_rspec2.rb +0 -91
- data/lib/generators/rspec/install/templates/.rspec +0 -1
- data/lib/rspec/rails/extensions/active_record/base.rb +0 -58
- data/lib/rspec/rails/infer_type_configuration.rb +0 -26
- data/lib/rspec/rails/matchers/have_extension.rb +0 -36
- data/lib/rspec/rails/mocks.rb +0 -284
- data/lib/rspec/rails/module_inclusion.rb +0 -19
- data/lib/rspec/rails/vendor/webrat.rb +0 -33
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
metadata.gz: !binary |-
|
|
9
|
-
Yjk4Y2EyNGU1ODBlODRhNGYwZTE3NzIzMzFiYjkxMWQ1YjBiM2I3ZDc2YzMx
|
|
10
|
-
YmE0NTkwYTJjYmJmYzI2NTQ1Y2YzYThjNzFhZDczMDBkODgwMmRlYzQyZTI5
|
|
11
|
-
MjYzYjRjZmRjYzQ5OTg0ZWI0YTNlYmRjNmNkNWVhZmUzZWJlMjE=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
ZDBkZmE3NjIwNTFhOWUyYzRmODAyZGYyNmI3YTJkODUzZTNjMzQxZTQ5NDU5
|
|
14
|
-
YjViMWU2MTQzZGVlMzliNmUyMTA3OTA5MDc0NWFkYTFjM2I2Njg0YjJhZjUy
|
|
15
|
-
NTRlMGY4OThlNjI5NWIzYjM3ZDZmNzRhZTNhOTViY2Y0YzBkZWI=
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: e7082373e70e8e1b7a77e4a29acde414d3a0f88d
|
|
4
|
+
data.tar.gz: 0a6fd867ecf7f7d201e2b6f8d3ebaaef7357b6bd
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: edae3eef56dee24c9ef3b6aa78e971ac353c83058a38a9bbc05efb7da6cd8ed00b89f4add64f54c5d606cf88b4df8ba0846d9315f966b4dc0709583bf51b1b50
|
|
7
|
+
data.tar.gz: ac61c06796d8788ba676bb95d1ee3551b727e4757e1b78c2bbecfdba86551fb4bfbc9d141c594f42a03ed6c8008009dea09237ea1ba2b75d3440a809ad2256c6
|
checksums.yaml.gz.sig
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
����̅���+��0L�x�����T�DZ@���v����u���U�P�i3�A}�� �]�B��������a�"E�M3�G�|������l��V� E�;�s֤�6�z��]e��\����v�O�����z�vGv'����2s��?yIϪ�u��6��C��G:2q��8�Al��Vc�q��|�1�<�b�y�e��^,<�R�\N���K-�Fh̭ v��bxv�7�`�#��7�?-*6�3~lq
|
data/.yardopts
CHANGED
data/Capybara.md
CHANGED
data/Changelog.md
CHANGED
|
@@ -1,3 +1,121 @@
|
|
|
1
|
+
### 3.1.0 / 2014-09-04
|
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.0.2...v3.1.0)
|
|
3
|
+
|
|
4
|
+
Enhancements:
|
|
5
|
+
|
|
6
|
+
* Switch to using the `have_http_status` matcher in spec generators. (Aaron Kromer, #1086)
|
|
7
|
+
* Update `rails_helper` generator to allow users to opt-in to auto-loading
|
|
8
|
+
`spec/support` files instead of forcing it upon them. (Aaron Kromer, #1137)
|
|
9
|
+
* Include generator for `ActiveJob`. (Abdelkader Boudih, #1155)
|
|
10
|
+
* Improve support for non-ActiveRecord apps by not loading ActiveRecord related
|
|
11
|
+
settings in the generated `rails_helper`. (Aaron Kromer, #1150)
|
|
12
|
+
* Remove Ruby warnings as a suggested configuration. (Aaron Kromer, #1163)
|
|
13
|
+
|
|
14
|
+
Bug Fixes:
|
|
15
|
+
|
|
16
|
+
* Fix controller route lookup for Rails 4.2. (Tomohiro Hashidate, #1142)
|
|
17
|
+
|
|
18
|
+
### 3.0.2 / 2014-07-21
|
|
19
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.0.1...v3.0.2)
|
|
20
|
+
|
|
21
|
+
Bug Fixes:
|
|
22
|
+
|
|
23
|
+
* Suppress warning in `SetupAndTeardownAdapter`. (André Arko, #1085)
|
|
24
|
+
* Remove dependency on Rubygems. (Andre Arko & Doc Riteze, #1099)
|
|
25
|
+
* Standardize controller spec template style. (Thomas Kriechbaumer, #1122)
|
|
26
|
+
|
|
27
|
+
### 3.0.1 / 2014-06-02
|
|
28
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.0.0...v3.0.1)
|
|
29
|
+
|
|
30
|
+
Bug Fixes:
|
|
31
|
+
|
|
32
|
+
* Fix missing require in `rails g rspec:install`. (Sam Phippen, #1058)
|
|
33
|
+
|
|
34
|
+
### 3.0.0 / 2014-06-01
|
|
35
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.0.0.rc1...v3.0.0)
|
|
36
|
+
|
|
37
|
+
Enhancements:
|
|
38
|
+
|
|
39
|
+
* Separate RSpec configuration in generated `spec_helper` from Rails setup
|
|
40
|
+
and associated configuration options. Moving Rails specific settings and
|
|
41
|
+
options to `rails_helper`. (Aaron Kromer)
|
|
42
|
+
|
|
43
|
+
Bug Fixes:
|
|
44
|
+
|
|
45
|
+
* Fix an issue with fixture support when `ActiveRecord` isn't loaded. (Jon Rowe)
|
|
46
|
+
|
|
47
|
+
### 3.0.0.rc1 / 2014-05-18
|
|
48
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.0.0.beta2...v3.0.0.rc1)
|
|
49
|
+
|
|
50
|
+
Breaking Changes for 3.0.0:
|
|
51
|
+
|
|
52
|
+
* Extracts the `mock_model` and `stub_model` methods to the
|
|
53
|
+
`rspec-activemodel-mocks` gem. (Thomas Holmes)
|
|
54
|
+
* Spec types are no longer inferred by location, they instead need to be
|
|
55
|
+
explicitly tagged. The old behaviour is enabled by
|
|
56
|
+
`config.infer_spec_type_from_file_location!`, which is still supplied
|
|
57
|
+
in the default generated `spec_helper.rb`. (Xavier Shay, Myron Marston)
|
|
58
|
+
* `controller` macro in controller specs no longer mutates
|
|
59
|
+
`:described_class` metadata. It still overrides the subject and sets
|
|
60
|
+
the controller, though. (Myron Marston)
|
|
61
|
+
* Stop depending on or requiring `rspec-collection_matchers`. Users who
|
|
62
|
+
want those matchers should add the gem to their Gemfile and require it
|
|
63
|
+
themselves. (Myron Marston)
|
|
64
|
+
* Removes runtime dependency on `ActiveModel`. (Rodrigo Rosenfeld Rosas)
|
|
65
|
+
|
|
66
|
+
Enhancements:
|
|
67
|
+
|
|
68
|
+
* Supports Rails 4.x reference attribute ids in generated scaffold for view
|
|
69
|
+
specs. (Giovanni Cappellotto)
|
|
70
|
+
* Add `have_http_status` matcher. (Aaron Kromer)
|
|
71
|
+
* Add spec type metadata to generator templates. (Aaron Kromer)
|
|
72
|
+
|
|
73
|
+
Bug Fixes:
|
|
74
|
+
|
|
75
|
+
* Fix an inconsistency in the generated scaffold specs for a controller. (Andy Waite)
|
|
76
|
+
* Ensure `config.before(:all, :type => <type>)` hooks run before groups
|
|
77
|
+
of the given type, even when the type is inferred by the file
|
|
78
|
+
location. (Jon Rowe, Myron Marston)
|
|
79
|
+
* Switch to parsing params with `Rack::Utils::parse_nested_query` to match Rails.
|
|
80
|
+
(Tim Watson)
|
|
81
|
+
* Fix incorrect namespacing of anonymous controller routes. (Aaron Kromer)
|
|
82
|
+
|
|
83
|
+
### 3.0.0.beta2 / 2014-02-17
|
|
84
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.0.0.beta1...v3.0.0.beta2)
|
|
85
|
+
|
|
86
|
+
Breaking Changes for 3.0.0:
|
|
87
|
+
|
|
88
|
+
* Removes the `--webrat` option for the request spec generator (Andy Lindeman)
|
|
89
|
+
* Methods from `Capybara::DSL` (e.g., `visit`) are no longer available in
|
|
90
|
+
controller specs. It is more appropriate to use capybara in feature specs
|
|
91
|
+
(`spec/features`) instead. (Andy Lindeman)
|
|
92
|
+
* `infer_base_class_for_anonymous_controllers` is
|
|
93
|
+
enabled by default. (Thomas Holmes)
|
|
94
|
+
* Capybara 2.2.0 or above is required for feature specs. (Andy Lindeman)
|
|
95
|
+
|
|
96
|
+
Enhancements:
|
|
97
|
+
|
|
98
|
+
* Improve `be_valid` matcher for non-ActiveModel::Errors implementations (Ben Hamill)
|
|
99
|
+
|
|
100
|
+
Bug Fixes:
|
|
101
|
+
|
|
102
|
+
* Use `__send__` rather than `send` to prevent naming collisions (Bradley Schaefer)
|
|
103
|
+
* Supports Rails 4.1. (Andy Lindeman)
|
|
104
|
+
* Routes are drawn correctly for anonymous controllers with abstract
|
|
105
|
+
parents. (Billy Chan)
|
|
106
|
+
* Loads ActiveSupport properly to support changes in Rails 4.1. (Andy Lindeman)
|
|
107
|
+
* Anonymous controllers inherit from `ActionController::Base` if `ApplicationController`
|
|
108
|
+
is not present. (Jon Rowe)
|
|
109
|
+
* Require `rspec/collection_matchers` when `rspec/rails` is required. (Yuji Nakayama)
|
|
110
|
+
|
|
111
|
+
### 3.0.0.beta1 / 2013-11-07
|
|
112
|
+
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v2.99.0...v3.0.0.beta1)
|
|
113
|
+
|
|
114
|
+
Breaking Changes for 3.0.0:
|
|
115
|
+
|
|
116
|
+
* Extracts `autotest` and `autotest-rails` support to `rspec-autotest` gem.
|
|
117
|
+
(Andy Lindeman)
|
|
118
|
+
|
|
1
119
|
### 2.99.0 / 2014-06-01
|
|
2
120
|
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v2.99.0.rc1...v2.99.0)
|
|
3
121
|
|
|
@@ -23,7 +141,14 @@ Deprecations
|
|
|
23
141
|
### 2.99.0.beta2 / 2014-02-17
|
|
24
142
|
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v2.99.0.beta1...v2.99.0.beta2)
|
|
25
143
|
|
|
26
|
-
|
|
144
|
+
Deprecations:
|
|
145
|
+
|
|
146
|
+
* Deprecates the `--webrat` option to the scaffold and request spec generator (Andy Lindeman)
|
|
147
|
+
* Deprecates the use of `Capybara::DSL` (e.g., `visit`) in controller specs.
|
|
148
|
+
It is more appropriate to use capybara in feature specs (`spec/features`)
|
|
149
|
+
instead. (Andy Lindeman)
|
|
150
|
+
|
|
151
|
+
Bug Fixes:
|
|
27
152
|
|
|
28
153
|
* Use `__send__` rather than `send` to prevent naming collisions (Bradley Schaefer)
|
|
29
154
|
* Supports Rails 4.1. (Andy Lindeman)
|
|
@@ -31,26 +156,19 @@ Bug fixes
|
|
|
31
156
|
* Anonymous controllers inherit from `ActionController::Base` if `ApplicationController`
|
|
32
157
|
is not present. (Jon Rowe)
|
|
33
158
|
|
|
34
|
-
Deprecations
|
|
35
|
-
|
|
36
|
-
* Deprecates the `--webrat` option to the scaffold and request spec generator (Andy Lindeman)
|
|
37
|
-
* Deprecates the use of `Capybara::DSL` (e.g., `visit`) in controller specs.
|
|
38
|
-
It is more appropriate to use capybara in feature specs (`spec/features`)
|
|
39
|
-
instead. (Andy Lindeman)
|
|
40
|
-
|
|
41
159
|
### 2.99.0.beta1 / 2013-11-07
|
|
42
160
|
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v2.14.0...v2.99.0.beta1)
|
|
43
161
|
|
|
44
|
-
Deprecations
|
|
162
|
+
Deprecations:
|
|
45
163
|
|
|
46
164
|
* Deprecates autotest integration in favor of the `rspec-autotest` gem. (Andy
|
|
47
165
|
Lindeman)
|
|
48
166
|
|
|
49
|
-
Enhancements
|
|
167
|
+
Enhancements:
|
|
50
168
|
|
|
51
169
|
* Supports Rails 4.1 and Minitest 5. (Patrick Van Stee)
|
|
52
170
|
|
|
53
|
-
Bug
|
|
171
|
+
Bug Fixes:
|
|
54
172
|
|
|
55
173
|
* Fixes "warning: instance variable @orig\_routes not initialized" raised by
|
|
56
174
|
controller specs when `--warnings` are enabled. (Andy Lindeman)
|
|
@@ -60,6 +178,21 @@ Bug fixes
|
|
|
60
178
|
* Explicitly depends on `activemodel`. This allows libraries that do not bring
|
|
61
179
|
in all of `rails` to use `rspec-rails`. (John Firebaugh)
|
|
62
180
|
|
|
181
|
+
### 2.14.1 / 2013-12-29
|
|
182
|
+
[full changelog](http://github.com/rspec/rspec-rails/compare/v2.14.0...v2.14.1)
|
|
183
|
+
|
|
184
|
+
Bug Fixes:
|
|
185
|
+
|
|
186
|
+
* Fixes "warning: instance variable @orig\_routes not initialized" raised by
|
|
187
|
+
controller specs when `--warnings` are enabled. (Andy Lindeman)
|
|
188
|
+
* Where possible, check against the version of ActiveRecord, rather than
|
|
189
|
+
Rails. It is possible to use some of rspec-rails without all of Rails.
|
|
190
|
+
(Darryl Pogue)
|
|
191
|
+
* Supports Rails 4.1 and Minitest 5. (Patrick Van Stee, Andy Lindeman)
|
|
192
|
+
* Explicitly depends on `activemodel`. This allows libraries that do not bring
|
|
193
|
+
in all of `rails` to use `rspec-rails`. (John Firebaugh)
|
|
194
|
+
* Use `__send__` rather than `send` to prevent naming collisions (Bradley Schaefer)
|
|
195
|
+
|
|
63
196
|
### 2.14.0 / 2013-07-06
|
|
64
197
|
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v2.14.0.rc1...v2.14.0)
|
|
65
198
|
|
|
@@ -96,6 +229,10 @@ Bug fixes
|
|
|
96
229
|
* Code that checks Rails version numbers is more robust in cases where Rails is
|
|
97
230
|
not fully loaded. (Andy Lindeman)
|
|
98
231
|
|
|
232
|
+
Enhancements
|
|
233
|
+
|
|
234
|
+
* Document how the spec/support directory works. (Sam Phippen)
|
|
235
|
+
|
|
99
236
|
### 2.13.1 / 2013-04-27
|
|
100
237
|
[Full Changelog](http://github.com/rspec/rspec-rails/compare/v2.13.0...v2.13.1)
|
|
101
238
|
|