cucumber-rails 1.7.0 → 2.3.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 +5 -5
- data/CHANGELOG.md +197 -19
- data/CONTRIBUTING.md +16 -14
- data/LICENSE +1 -1
- data/README.md +27 -21
- data/lib/cucumber/rails.rb +23 -17
- data/lib/cucumber/rails/action_dispatch.rb +21 -0
- data/lib/cucumber/rails/application.rb +16 -7
- data/lib/cucumber/rails/capybara.rb +2 -0
- data/lib/cucumber/rails/capybara/javascript_emulation.rb +42 -21
- data/lib/cucumber/rails/capybara/select_dates_and_times.rb +3 -1
- data/lib/cucumber/rails/database.rb +24 -56
- data/lib/cucumber/rails/database/deletion_strategy.rb +13 -0
- data/lib/cucumber/rails/database/shared_connection_strategy.rb +27 -0
- data/lib/cucumber/rails/database/strategy.rb +33 -0
- data/lib/cucumber/rails/database/truncation_strategy.rb +13 -0
- data/lib/cucumber/rails/hooks.rb +2 -0
- data/lib/cucumber/rails/hooks/active_record.rb +8 -4
- data/lib/cucumber/rails/hooks/allow_rescue.rb +2 -0
- data/lib/cucumber/rails/hooks/database_cleaner.rb +11 -3
- data/lib/cucumber/rails/hooks/mail.rb +3 -1
- data/lib/cucumber/rails/rspec.rb +3 -1
- data/lib/cucumber/rails/world.rb +24 -7
- data/lib/generators/cucumber/{install/USAGE → USAGE} +0 -0
- data/lib/generators/cucumber/{install/install_generator.rb → install_generator.rb} +18 -9
- data/lib/generators/cucumber/{install/templates → templates}/config/cucumber.yml.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/script/cucumber +1 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/_rails_each_run.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/_rails_prefork.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/capybara.rb +2 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/edit_warning.txt +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/rails.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/rails_spork.rb.erb +0 -0
- data/lib/generators/cucumber/{install/templates → templates}/tasks/cucumber.rake.erb +0 -0
- metadata +100 -169
- data/.github/ISSUE_TEMPLATE.md +0 -52
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -42
- data/.gitignore +0 -13
- data/.rspec +0 -1
- data/.rubocop.yml +0 -1
- data/.rubocop_todo.yml +0 -443
- data/.travis.yml +0 -45
- data/Appraisals +0 -32
- data/Gemfile +0 -7
- data/Rakefile +0 -49
- data/bin/install_geckodriver.sh +0 -19
- data/bin/install_webpacker.sh +0 -9
- data/config/.gitignore +0 -1
- data/config/cucumber.yml +0 -17
- data/cucumber-rails.gemspec +0 -44
- data/dev_tasks/cucumber.rake +0 -3
- data/dev_tasks/rspec.rake +0 -3
- data/dev_tasks/yard.rake +0 -35
- data/dev_tasks/yard/default/layout/html/bubble_32x32.png +0 -0
- data/dev_tasks/yard/default/layout/html/footer.erb +0 -5
- data/dev_tasks/yard/default/layout/html/index.erb +0 -1
- data/dev_tasks/yard/default/layout/html/layout.erb +0 -25
- data/dev_tasks/yard/default/layout/html/logo.erb +0 -1
- data/dev_tasks/yard/default/layout/html/setup.rb +0 -4
- data/features/allow_rescue.feature +0 -65
- data/features/annotations.feature +0 -22
- data/features/capybara_javascript_drivers.feature +0 -73
- data/features/choose_javascript_database_strategy.feature +0 -145
- data/features/database_cleaner.feature +0 -44
- data/features/disable_automatic_database_cleaning.feature +0 -55
- data/features/emulate_javascript.feature +0 -94
- data/features/install_cucumber_rails.feature +0 -14
- data/features/no_database.feature +0 -61
- data/features/raising_errors.feature +0 -16
- data/features/rerun_profile.feature +0 -46
- data/features/rest_api.feature +0 -47
- data/features/step_definitions/cucumber_rails_steps.rb +0 -153
- data/features/support/aruba.rb +0 -3
- data/features/support/bundler_pre_support.rb +0 -28
- data/features/support/env.rb +0 -40
- data/features/support/fixtures/bundler-1.0.21.gem +0 -0
- data/features/support/fixtures/bundler-1.1.rc.gem +0 -0
- data/features/support/legacy_web_steps_support.rb +0 -289
- data/gemfiles/rails_4_2.gemfile +0 -10
- data/gemfiles/rails_5_0.gemfile +0 -10
- data/gemfiles/rails_5_1.gemfile +0 -10
- data/gemfiles/rails_5_2.gemfile +0 -10
- data/gemfiles/rails_6_0.gemfile +0 -8
- data/lib/cucumber/rails/action_controller.rb +0 -13
- data/spec/cucumber/rails/database_spec.rb +0 -57
- data/spec/generators/cucumber/install/install_generator_spec.rb +0 -47
- data/spec/spec_helper.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a39afb58224bd44c7d0c5585749b47030995e18f24788bded736cd64f349e89a
|
4
|
+
data.tar.gz: 9f661d7af61c748f6e6435178c48ef18cc4d274e3a9c2ea900faacbd953e57fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543e907c2756ceb148f313adcf0a381fd7de5bd23eed17abda861be526dec27fdea5b96bc84c46dd0ce52b0d70fe9088e5e62695ec844ee12fdd08e074228b8f
|
7
|
+
data.tar.gz: e05864510bce02b11bb508f89c5a31ed4d8a88e90424e2f9c463513187b598d2d78f8255e8316b7fba9637680acf01637eaccf9c2578722551aed740694dfca3
|
data/CHANGELOG.md
CHANGED
@@ -1,34 +1,194 @@
|
|
1
|
-
Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md)
|
1
|
+
Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md)
|
2
|
+
on how to contribute to Cucumber.
|
2
3
|
|
3
|
-
## [master](https://github.com/cucumber/cucumber-rails/compare/
|
4
|
-
|
4
|
+
## [master](https://github.com/cucumber/cucumber-rails/compare/v2.3.0...master) (Not yet released)
|
5
|
+
|
6
|
+
### New Features
|
7
|
+
|
8
|
+
*
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
*
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
|
16
|
+
*
|
17
|
+
|
18
|
+
## [v2.3.0](https://github.com/cucumber/cucumber-rails/compare/v2.2.0...v2.3.0) (2021-03-30)
|
19
|
+
|
20
|
+
### New Features
|
21
|
+
|
22
|
+
*
|
23
|
+
|
24
|
+
### Changed
|
25
|
+
|
26
|
+
* Changed dependency from rails to railties to avoid pulling in optional Rails gems like actioncable ([#486](https://github.com/cucumber/cucumber-rails/pull/486) [langalex])
|
27
|
+
|
28
|
+
* Lightened gem binary by removing un-needed files ([#496](https://github.com/cucumber/cucumber-rails/pull/496) [orien])
|
29
|
+
|
30
|
+
### Fixed
|
31
|
+
|
32
|
+
* Fixed up a couple of legacy capybara specs to use a better format ([#498](https://github.com/cucumber/cucumber-rails/pull/498) [luke-hill])
|
33
|
+
|
34
|
+
## [v2.2.0](https://github.com/cucumber/cucumber-rails/compare/v2.1.0...v2.2.0) (2020-08-10)
|
35
|
+
|
36
|
+
### New Features
|
37
|
+
|
38
|
+
* Added more documentation and tests around Javascript tagged scenarios
|
39
|
+
([#480](https://github.com/cucumber/cucumber-rails/pull/480) [luke-hill])
|
40
|
+
|
41
|
+
* Gem Updates
|
42
|
+
* Allowed cucumber5, updated other gem dependencies
|
43
|
+
* Updated travis runs and gem builds tested against
|
44
|
+
([#482](https://github.com/cucumber/cucumber-rails/pull/482) [luke-hill])
|
45
|
+
|
46
|
+
### Changed
|
47
|
+
|
48
|
+
* Dropped Rails 4.2 support ([#392](https://github.com/cucumber/cucumber-rails/pull/392) [deivid-rodriguez])
|
49
|
+
|
50
|
+
### Fixed
|
51
|
+
|
52
|
+
* Database cleaning no longer silently fails when using database_cleaner v2 adapter gems
|
53
|
+
([#467](https://github.com/cucumber/cucumber-rails/pull/467) [botandrose])
|
54
|
+
|
55
|
+
* Restored compatibility with `database_cleaner` versions earlier than 1.8.0.beta
|
56
|
+
([#473](https://github.com/cucumber/cucumber-rails/pull/473) [cgriego])
|
57
|
+
|
58
|
+
* Restored previous `database_cleaner` behavior for apps that do not use/load ActiveRecord
|
59
|
+
([#474](https://github.com/cucumber/cucumber-rails/pull/474) [cgriego])
|
60
|
+
|
61
|
+
* Restored previous compatibility around standard Rails Modules not being loaded
|
62
|
+
([#484](https://github.com/cucumber/cucumber-rails/pull/484) [Draiken])
|
63
|
+
|
64
|
+
## [v2.1.0](https://github.com/cucumber/cucumber-rails/compare/v2.0.0...v2.1.0) (2020-06-15)
|
65
|
+
|
66
|
+
### New Features
|
67
|
+
|
68
|
+
* Added metadata to allow gem to be searched / indexed by rubygems
|
69
|
+
([#447](https://github.com/cucumber/cucumber-rails/pull/447) [orien])
|
70
|
+
|
71
|
+
* Allow Cucumber 4 to be used as an option for cucumber-rails
|
72
|
+
* NB: Cucumber4 changes quite a lot of logic with auto-loaders. This means that any previous
|
73
|
+
logic that relied implicitly on load-order "may" be affected
|
74
|
+
([#453](https://github.com/cucumber/cucumber-rails/pull/453) [luke-hill] / [deivid-rodriguez])
|
75
|
+
|
76
|
+
### Changed
|
77
|
+
|
78
|
+
* Dropped Ruby 2.3 support (target 2.4 - 2.7) ([#466](https://github.com/cucumber/cucumber-rails/pull/466) [mvz])
|
79
|
+
|
80
|
+
* Refactored suite to remove a lot of old Rails3/4.0 "ism's"
|
81
|
+
* Also migrated a lot of old cucumber styles to cucumber4
|
82
|
+
([#441](https://github.com/cucumber/cucumber-rails/pull/441) [luke-hill])
|
83
|
+
|
84
|
+
* Refactored alias logic for overriding Rails methods to use `Module#prepend`
|
85
|
+
([#457](https://github.com/cucumber/cucumber-rails/pull/457) [wagenet])
|
86
|
+
|
87
|
+
* `database_cleaner` (when used), at a version `>= 1.8` will now silence all warnings
|
88
|
+
* The suite internally will only test a version `>= 1.8`, so other versions will work but are un-maintained
|
89
|
+
([#463](https://github.com/cucumber/cucumber-rails/pull/463) [deivid-rodriguez])
|
90
|
+
|
91
|
+
### Fixed
|
92
|
+
|
93
|
+
* Various rubocop / rspec styling fixes
|
94
|
+
([#445](https://github.com/cucumber/cucumber-rails/pull/445) /
|
95
|
+
[#449](https://github.com/cucumber/cucumber-rails/pull/449) /
|
96
|
+
[#450](https://github.com/cucumber/cucumber-rails/pull/450) /
|
97
|
+
[#451](https://github.com/cucumber/cucumber-rails/pull/451) /
|
98
|
+
[#452](https://github.com/cucumber/cucumber-rails/pull/452) /
|
99
|
+
[#465](https://github.com/cucumber/cucumber-rails/pull/465)
|
100
|
+
[mvz] / [luke-hill])
|
101
|
+
|
102
|
+
* Various CI fixes
|
103
|
+
([#444](https://github.com/cucumber/cucumber-rails/pull/444) /
|
104
|
+
[#460](https://github.com/cucumber/cucumber-rails/pull/460) /
|
105
|
+
[#464](https://github.com/cucumber/cucumber-rails/pull/464)
|
106
|
+
[mvz] / [damonjmurray] / [deivid-rodriguez])
|
107
|
+
|
108
|
+
* Avoid printing a warning about `config.cache_classes` being set to `false` when
|
109
|
+
Spring is used ([#462](https://github.com/cucumber/cucumber-rails/pull/462) [janko])
|
110
|
+
|
111
|
+
## [v2.0.0](https://github.com/cucumber/cucumber-rails/compare/v1.8.0...v2.0.0) (2019-09-13)
|
112
|
+
|
113
|
+
### New Features
|
114
|
+
|
115
|
+
* New functionality allows users to Configure whether `Rack::Test` methods get auto-mixed in
|
116
|
+
* Setting `ENV['CR_REMOVE_RACK_TEST_HELPERS] = "true"` will remove these methods from the `World`
|
117
|
+
([#440](https://github.com/cucumber/cucumber-rails/pull/440) [luke-hill])
|
118
|
+
|
119
|
+
### Changed
|
120
|
+
|
121
|
+
* **Breaking change:** `web_steps` have been completely removed from cucumber-rails
|
122
|
+
([#437](https://github.com/cucumber/cucumber-rails/pull/437) [luke-hill])
|
123
|
+
|
124
|
+
* Altered some branching logic in tests designed to cater for old ruby/rails versions
|
125
|
+
([#433](https://github.com/cucumber/cucumber-rails/pull/433) [luke-hill])
|
126
|
+
|
127
|
+
## [v1.8.0](https://github.com/cucumber/cucumber-rails/compare/v1.7.0..v1.8.0) (2019-08-06)
|
128
|
+
|
129
|
+
### Changed
|
130
|
+
|
131
|
+
* Dropped Ruby 2.2 support (target 2.3 and up) ([#424](https://github.com/cucumber/cucumber-rails/pull/424) [mvz])
|
132
|
+
|
133
|
+
* Begin to update the core runtime / development dependencies to something a little more recent
|
134
|
+
([#413](https://github.com/cucumber/cucumber-rails/pull/413) /
|
135
|
+
[#431](https://github.com/cucumber/cucumber-rails/pull/431) /
|
136
|
+
[#432](https://github.com/cucumber/cucumber-rails/pull/432)
|
137
|
+
[mvz] /
|
138
|
+
[luke-hill])
|
139
|
+
|
140
|
+
### Fixed
|
141
|
+
|
142
|
+
* Various rubocop / styling issues that had built up over time
|
143
|
+
([#414](https://github.com/cucumber/cucumber-rails/pull/414) /
|
144
|
+
[#416](https://github.com/cucumber/cucumber-rails/pull/416) /
|
145
|
+
[#419](https://github.com/cucumber/cucumber-rails/pull/419) /
|
146
|
+
[#420](https://github.com/cucumber/cucumber-rails/pull/420) /
|
147
|
+
[#421](https://github.com/cucumber/cucumber-rails/pull/421) /
|
148
|
+
[#421](https://github.com/cucumber/cucumber-rails/pull/434)
|
149
|
+
[luke-hill] /
|
150
|
+
[mvz])
|
151
|
+
|
152
|
+
* Generic Travis Healthcheck (Fixed up polluted logs and use newer Ubuntu OS)
|
153
|
+
([#415](https://github.com/cucumber/cucumber-rails/pull/415) /
|
154
|
+
[#417](https://github.com/cucumber/cucumber-rails/pull/417)
|
155
|
+
[luke-hill])
|
156
|
+
|
157
|
+
* Rails6 not building correctly
|
158
|
+
([#418](https://github.com/cucumber/cucumber-rails/pull/418)
|
159
|
+
[luke-hill])
|
160
|
+
|
161
|
+
* Provisional Ruby 2.7 builds not working
|
162
|
+
([#427](https://github.com/cucumber/cucumber-rails/pull/427)
|
163
|
+
[amatsuda] /
|
164
|
+
[luke-hill])
|
5
165
|
|
6
166
|
## [v1.7.0](https://github.com/cucumber/cucumber-rails/compare/v1.6.0...v1.7.0) (2019-04-17)
|
7
167
|
|
8
168
|
### Changed
|
9
169
|
|
10
|
-
* Drop rails `4.0` / `4.1` support ([#392](https://github.com/cucumber/cucumber-rails/pull/392) [deivid-rodriguez]
|
11
|
-
* Allow Ruby `2.6` users to `ERB.new` ([#399](https://github.com/cucumber/cucumber-rails/pull/399) [koic]
|
12
|
-
* Allow Rails to be used in the `6.x` series (Currently as of release only beta1 is supported) ([#405](https://github.com/cucumber/cucumber-rails/pull/405) [kotovalexarian]
|
13
|
-
* Update CI to test most relevant Rubies ([#411](https://github.com/cucumber/cucumber-rails/pull/411) [olleolleolle]
|
170
|
+
* Drop rails `4.0` / `4.1` support ([#392](https://github.com/cucumber/cucumber-rails/pull/392) [deivid-rodriguez])
|
171
|
+
* Allow Ruby `2.6` users to `ERB.new` ([#399](https://github.com/cucumber/cucumber-rails/pull/399) [koic])
|
172
|
+
* Allow Rails to be used in the `6.x` series (Currently as of release only beta1 is supported) ([#405](https://github.com/cucumber/cucumber-rails/pull/405) [kotovalexarian])
|
173
|
+
* Update CI to test most relevant Rubies ([#411](https://github.com/cucumber/cucumber-rails/pull/411) [olleolleolle])
|
14
174
|
|
15
175
|
### Fixed
|
16
176
|
|
17
177
|
* Appraisals fixes (Up-to-date `geckodriver`, standardised the various `.gemfile`s)
|
18
|
-
[#389](https://github.com/cucumber/cucumber-rails/pull/389) /
|
178
|
+
([#389](https://github.com/cucumber/cucumber-rails/pull/389) /
|
19
179
|
[#394](https://github.com/cucumber/cucumber-rails/pull/394) /
|
20
180
|
[#395](https://github.com/cucumber/cucumber-rails/pull/395) /
|
21
181
|
[#408](https://github.com/cucumber/cucumber-rails/pull/408)
|
22
|
-
[xtrasimplicity]
|
23
|
-
[deivid-rodriguez]
|
24
|
-
[mvz]
|
25
|
-
|
182
|
+
[xtrasimplicity] /
|
183
|
+
[deivid-rodriguez] /
|
184
|
+
[mvz])
|
185
|
+
|
26
186
|
* Various build issues that had built up over the previous year
|
27
|
-
[#403](https://github.com/cucumber/cucumber-rails/pull/403) /
|
187
|
+
([#403](https://github.com/cucumber/cucumber-rails/pull/403) /
|
28
188
|
[#404](https://github.com/cucumber/cucumber-rails/pull/404) /
|
29
189
|
[#410](https://github.com/cucumber/cucumber-rails/pull/410)
|
30
|
-
[koic]
|
31
|
-
[mvz]
|
190
|
+
[koic] /
|
191
|
+
[mvz])
|
32
192
|
|
33
193
|
## [v1.6.0](https://github.com/cucumber/cucumber-rails/compare/v1.5.0...v1.6.0) (2018-04-23)
|
34
194
|
|
@@ -40,9 +200,9 @@ There are currently no unreleased changes.
|
|
40
200
|
* Updated syntax to support both new and deprecated forms of tag negation. ([#348](https://github.com/cucumber/cucumber-rails/pull/348) [mirelon](https://github.com/mirelon), [#359](https://github.com/cucumber/cucumber-rails/pull/359) [xtrasimplicity](https://github.com/xtrasimplicity))
|
41
201
|
* Dependencies: Allowed `Ammeter` versions greater than 1.1.3. ([#368](https://github.com/cucumber/cucumber-rails/pull/368) [mvz](https://github.com/mvz))
|
42
202
|
* Switched to Ruby 1.9 hash syntax. ([#371](https://github.com/cucumber/cucumber-rails/pull/371) [mvz](https://github.com/mvz))
|
43
|
-
* Added support to handle rerun files with multiple lines. ([#
|
203
|
+
* Added support to handle rerun files with multiple lines. ([#373]((https://github.com/cucumber/cucumber-rails/pull/345)) [mvz](https://github.com/mvz))
|
44
204
|
* Added support for Rails 5.2 and Capybara 3. ([#378](https://github.com/cucumber/cucumber-rails/pull/378/) [gobijan](https://github.com/gobijan), [radar](https://github.com/radar), [xtrasimplicity](https://github.com/xtrasimplicity))
|
45
|
-
|
205
|
+
|
46
206
|
### Fixed
|
47
207
|
|
48
208
|
* Fix typo ([#343](https://github.com/cucumber/cucumber-rails/pull/343) Olle Jonsson)
|
@@ -52,12 +212,12 @@ There are currently no unreleased changes.
|
|
52
212
|
## [v1.5.0](https://github.com/cucumber/cucumber-rails/compare/1.4.5...1.5.0) (2017-05-12)
|
53
213
|
|
54
214
|
* Drop rails 3 support ([#334](https://github.com/cucumber/cucumber-rails/pull/334) Matijs van Zuijlen)
|
55
|
-
* Add
|
215
|
+
* Add rails 5.1 support ([#337](https://github.com/cucumber/cucumber-rails/pull/337) Matijs van Zuijlen - Rafael Reggiani Manzo)
|
56
216
|
|
57
217
|
## [v1.4.5](https://github.com/cucumber/cucumber-rails/compare/1.4.4...1.4.5) (2016-09-27)
|
58
218
|
|
59
219
|
* Add support for Cucumber 3+ (Steve Tooke)
|
60
|
-
|
220
|
+
|
61
221
|
## [v1.4.4](https://github.com/cucumber/cucumber-rails/compare/1.4.3...1.4.4) (2016-08-05)
|
62
222
|
|
63
223
|
* Ensure support for Rails 5
|
@@ -492,3 +652,21 @@ and to celebrate that cucumber-rails now supports Capybara as an alternative to
|
|
492
652
|
* Webrat step "Then I should be on" should use request_uri instead of path for missing query string parameters (ZhangJinzhu)
|
493
653
|
* Added MIME type parameter to attach file step definition (Felix Flores)
|
494
654
|
* Added check when including ActiveSupport::Testing::SetupAndTeardown for older Rails versions (Jeremy Durham)
|
655
|
+
|
656
|
+
[deivid-rodriguez]: https://github.com/deivid-rodriguez
|
657
|
+
[koic]: https://github.com/koic
|
658
|
+
[kotovalexarian]: https://github.com/kotovalexarian
|
659
|
+
[mvz]: https://github.com/mvz
|
660
|
+
[olleolleolle]: https://github.com/olleolleolle
|
661
|
+
[luke-hill]: https://github.com/luke-hill
|
662
|
+
[amatsuda]: https://github.com/amatsuda
|
663
|
+
[xtrasimplicity]: https://github.com/xtrasimplicity
|
664
|
+
[janko]: https://github.com/janko
|
665
|
+
[damonjmurray]: https://github.com/damonjmurray
|
666
|
+
[orien]: https://github.com/orien
|
667
|
+
[wagenet]: https://github.com/wagenet
|
668
|
+
[cgriego]: https://github.com/cgriego
|
669
|
+
[botandrose]: https://github.com/botandrose
|
670
|
+
[Draiken]: https://github.com/Draiken
|
671
|
+
[langalex]: https://github.com/langalex
|
672
|
+
[orien]: https://github.com/orien
|
data/CONTRIBUTING.md
CHANGED
@@ -29,8 +29,23 @@ This document is a guide for those maintaining Cucumber-Rails, and others who wo
|
|
29
29
|
bundle install
|
30
30
|
bin/install_geckodriver.sh
|
31
31
|
bin/install_webpacker.sh
|
32
|
-
|
32
|
+
# Then to run tests on one version-specific Gemfile (e.g. gemfiles/rails_6_0.gemfile), run
|
33
|
+
bundle exec appraisal rails_6_0 rake test
|
34
|
+
# Or run tests across the full supported stack. Note that because we support many versions. This takes 5-10 minutes
|
35
|
+
bundle exec rake appraisal
|
36
|
+
|
37
|
+
## Updating Appraisal gems / dependencies of cucumber-rails
|
38
|
+
|
39
|
+
To remove and rebuild the different gemfiles (for example, to update a rails version or its
|
40
|
+
dependencies), use the following:
|
41
|
+
|
42
|
+
[bundle exec] appraisal update
|
43
|
+
|
44
|
+
If you've changed versions of the dependencies, you may find it helpful to forcefully clean
|
45
|
+
each appraisal's gem lock file in `gemfiles/`. You can do this using:
|
33
46
|
|
47
|
+
[bundle exec] rake clean
|
48
|
+
|
34
49
|
## Release Process
|
35
50
|
|
36
51
|
* Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes.
|
@@ -44,19 +59,6 @@ Now release it
|
|
44
59
|
git commit -m "Release X.Y.Z"
|
45
60
|
rake release
|
46
61
|
|
47
|
-
### NOTE:
|
48
|
-
|
49
|
-
If after running the rake release task you get an error similar to this:
|
50
|
-
|
51
|
-
rake aborted!
|
52
|
-
Couldn't git push. `git push 2>&1' failed with the following output:
|
53
|
-
|
54
|
-
To git@github.com:cucumber/cucumber-rails.git
|
55
|
-
! [rejected] rails-2.3.x -> rails-2.3.x (non-fast-forward)
|
56
|
-
error: failed to push some refs to 'git@github.com:cucumber/cucumber-rails.git'
|
57
|
-
|
58
|
-
make sure that you have pulled all the recent changes from the master branch
|
59
|
-
|
60
62
|
## Gaining Release Karma
|
61
63
|
|
62
64
|
To become a release manager, create a pull request adding your name to the list below, including
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2008-
|
3
|
+
Copyright (c) 2008-2020 Aslak Hellesøy and the Cucumber Team.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -5,8 +5,7 @@
|
|
5
5
|
[](https://codeclimate.com/github/cucumber/cucumber-rails)
|
6
6
|
[](https://www.codetriage.com/cucumber/cucumber-rails)
|
7
7
|
|
8
|
-
Cucumber-Rails brings Cucumber to Rails
|
9
|
-
but this is currently in a beta phase, so there may be issues.
|
8
|
+
Cucumber-Rails brings Cucumber to Rails 5.x and 6.x.
|
10
9
|
|
11
10
|
## Installation
|
12
11
|
|
@@ -44,7 +43,8 @@ Without Rake:
|
|
44
43
|
|
45
44
|
## Configuration options
|
46
45
|
|
47
|
-
By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean`
|
46
|
+
By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean`
|
47
|
+
before and after your scenarios. You can disable this behaviour like so:
|
48
48
|
|
49
49
|
```ruby
|
50
50
|
# features/support/env.rb
|
@@ -52,6 +52,12 @@ By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.cle
|
|
52
52
|
Cucumber::Rails::Database.autorun_database_cleaner = false
|
53
53
|
```
|
54
54
|
|
55
|
+
By default, cucumber-rails will auto mix-in the helpers from `Rack::Test` into your default Cucumber World instance. You can prevent this behaviour like so:
|
56
|
+
```ruby
|
57
|
+
# features/support/env.rb
|
58
|
+
ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
|
59
|
+
```
|
60
|
+
|
55
61
|
## Upgrading from a previous version
|
56
62
|
|
57
63
|
When upgrading from a previous version it is recommended that you rerun:
|
@@ -60,14 +66,20 @@ When upgrading from a previous version it is recommended that you rerun:
|
|
60
66
|
|
61
67
|
## Bugs and feature requests
|
62
68
|
|
63
|
-
The *only* way to have a bug fixed or a new feature accepted is to describe it with a
|
69
|
+
The *only* way to have a bug fixed or a new feature accepted is to describe it with a
|
70
|
+
Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator.
|
71
|
+
Fork this project, clone it to your workstation and check out a branch with a descriptive name:
|
64
72
|
|
65
73
|
git clone git@github.com:you/cucumber-rails.git
|
66
|
-
git checkout -b
|
74
|
+
git checkout -b bugfix/generator-fails-on-ruby-25
|
67
75
|
|
68
|
-
Start by making sure you can run the existing features. Now, create a feature that demonstrates
|
76
|
+
Start by making sure you can run the existing features. Now, create a feature that demonstrates
|
77
|
+
what's wrong. See the existing features for examples. When you have a failing feature that
|
78
|
+
reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team
|
79
|
+
will review it and hopefully create a fix.
|
69
80
|
|
70
|
-
If you know how to fix the bug yourself, make a second commit (after committing the failing
|
81
|
+
If you know how to fix the bug yourself, make a second commit (after committing the failing
|
82
|
+
feature) before you send the pull request.
|
71
83
|
|
72
84
|
### Setting up your environment
|
73
85
|
|
@@ -86,24 +98,17 @@ With all dependencies installed, all specs and features should pass:
|
|
86
98
|
|
87
99
|
### Running Appraisal suite
|
88
100
|
|
89
|
-
In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal)
|
101
|
+
In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal)
|
102
|
+
gem is used to generate multiple gemfiles, stored in the `gemfiles/` directory.
|
103
|
+
Normally these will only run on Travis; however, if you want to run the full test suite against
|
104
|
+
all gemfiles, run the following commands:
|
90
105
|
|
91
106
|
[bundle exec] appraisal install
|
92
107
|
[bundle exec] appraisal rake test
|
93
108
|
|
94
109
|
To run the suite against a named gemfile, use the following:
|
95
110
|
|
96
|
-
[bundle exec] appraisal
|
97
|
-
|
98
|
-
To remove and rebuild the different gemfiles (for example, to update a rails version or its dependencies), use the following:
|
99
|
-
|
100
|
-
[bundle exec] appraisal install
|
101
|
-
|
102
|
-
If you've changed versions of the dependencies, you may find it helpful to forcefully clean each appraisal's gem lock file in `gemfiles/`. You can do this using:
|
103
|
-
|
104
|
-
[bundle exec] rake clean
|
105
|
-
|
106
|
-
|
111
|
+
[bundle exec] appraisal rails_6_0 rake test
|
107
112
|
|
108
113
|
### Adding dependencies
|
109
114
|
|
@@ -111,7 +116,8 @@ To support the multiple-gemfile testing, when adding a new dependency the follow
|
|
111
116
|
|
112
117
|
1. If it's a runtime dependency of the gem, add it to the gemspec
|
113
118
|
2. If it's a primary development dependency, add it to the gemspec
|
114
|
-
3. If it's a dependency of a generated rails app in a test, add it to [the helper] that
|
119
|
+
3. If it's a dependency of a generated rails app in a test, add it to [the helper] that
|
120
|
+
modifies the `Gemfile`.
|
115
121
|
|
116
122
|
For example, rspec is a primary development dependency, so it lives in the gemspec.
|
117
123
|
|
@@ -123,7 +129,7 @@ If you get an error while trying to run the tests locally, similar to the one be
|
|
123
129
|
|
124
130
|
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
|
125
131
|
|
126
|
-
|
132
|
+
You need to install a javascript runtime.
|
127
133
|
|
128
134
|
You can do that in ubuntu by using:
|
129
135
|
|
data/lib/cucumber/rails.rb
CHANGED
@@ -1,31 +1,37 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
called_from_env_rb = caller.detect { |f| f.include? '/env.rb:' }
|
4
|
+
|
5
|
+
if called_from_env_rb
|
6
|
+
env_caller = File.dirname(called_from_env_rb)
|
7
|
+
|
3
8
|
require 'rails'
|
4
9
|
require 'cucumber/rails/application'
|
5
10
|
ENV['RAILS_ENV'] ||= 'test'
|
6
|
-
ENV['RAILS_ROOT'] ||= File.expand_path(env_caller
|
7
|
-
require File.expand_path(ENV['RAILS_ROOT']
|
8
|
-
require 'cucumber/rails/
|
9
|
-
|
10
|
-
if defined?(ActiveRecord::Base)
|
11
|
-
require 'rails/test_help'
|
12
|
-
else
|
13
|
-
require 'action_dispatch/testing/test_process'
|
14
|
-
require 'action_dispatch/testing/integration'
|
15
|
-
end
|
11
|
+
ENV['RAILS_ROOT'] ||= File.expand_path("#{env_caller}/../..")
|
12
|
+
require File.expand_path("#{ENV['RAILS_ROOT']}/config/environment")
|
13
|
+
require 'cucumber/rails/action_dispatch'
|
14
|
+
require 'rails/test_help'
|
16
15
|
|
17
|
-
unless Rails.application.config.cache_classes
|
18
|
-
warn "WARNING: You have set Rails' config.cache_classes to false
|
16
|
+
unless Rails.application.config.cache_classes || defined?(Spring)
|
17
|
+
warn "WARNING: You have set Rails' config.cache_classes to false
|
18
|
+
(Spring needs cache_classes set to false). This is known to cause problems
|
19
|
+
with database transactions. Set config.cache_classes to true if you want to use transactions."
|
19
20
|
end
|
20
21
|
|
21
22
|
require 'cucumber/rails/world'
|
22
23
|
require 'cucumber/rails/hooks'
|
23
24
|
require 'cucumber/rails/capybara'
|
25
|
+
require 'cucumber/rails/database/strategy'
|
26
|
+
require 'cucumber/rails/database/deletion_strategy'
|
27
|
+
require 'cucumber/rails/database/shared_connection_strategy'
|
28
|
+
require 'cucumber/rails/database/truncation_strategy'
|
24
29
|
require 'cucumber/rails/database'
|
25
30
|
|
26
31
|
MultiTest.disable_autorun
|
27
32
|
else
|
28
|
-
warn "WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred
|
29
|
-
To avoid this warning, move 'gem \'cucumber-rails\', require: false'
|
30
|
-
If already in the :test group, be sure you are
|
33
|
+
warn "WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred
|
34
|
+
until env.rb is called. To avoid this warning, move 'gem \'cucumber-rails\', require: false'
|
35
|
+
under only group :test in your Gemfile. If already in the :test group, be sure you are
|
36
|
+
specifying 'require: false'."
|
31
37
|
end
|