cucumber-rails 1.4.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/ISSUE_TEMPLATE.md +52 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- data/.gitignore +3 -0
- data/.rspec +4 -1
- data/.rubocop.yml +68 -0
- data/.travis.yml +53 -26
- data/Appraisals +27 -63
- data/{History.md → CHANGELOG.md} +299 -19
- data/CONTRIBUTING.md +18 -27
- data/Gemfile +2 -4
- data/LICENSE +1 -1
- data/README.md +73 -29
- data/Rakefile +18 -14
- data/bin/install_geckodriver.sh +19 -0
- data/bin/install_webpacker.sh +9 -0
- data/config/cucumber.yml +5 -3
- data/cucumber-rails.gemspec +37 -25
- data/dev_tasks/cucumber.rake +3 -3
- data/dev_tasks/rspec.rake +3 -6
- data/dev_tasks/yard/default/layout/html/footer.erb +1 -1
- data/dev_tasks/yard/default/layout/html/layout.erb +5 -5
- data/dev_tasks/yard/default/layout/html/logo.erb +1 -1
- data/dev_tasks/yard/default/layout/html/setup.rb +6 -1
- data/dev_tasks/yard.rake +7 -14
- data/features/allow_rescue.feature +17 -12
- data/features/annotations.feature +20 -0
- data/features/capybara_javascript_drivers.feature +42 -32
- data/features/choose_javascript_database_strategy.feature +38 -57
- data/features/configuration.feature +48 -0
- data/features/database_cleaner.feature +20 -20
- data/features/disable_automatic_database_cleaning.feature +13 -19
- data/features/emulate_javascript.feature +65 -48
- data/features/install_cucumber_rails.feature +6 -5
- data/features/no_database.feature +8 -15
- data/features/raising_errors.feature +10 -4
- data/features/rerun_profile.feature +18 -8
- data/features/rest_api.feature +13 -13
- data/features/step_definitions/cucumber_rails_steps.rb +52 -66
- data/features/support/aruba.rb +5 -0
- data/features/support/cucumber_rails_helper.rb +85 -0
- data/features/support/env.rb +4 -35
- data/features/support/hooks.rb +8 -0
- data/gemfiles/rails_4_2.gemfile +10 -0
- data/gemfiles/rails_5_0.gemfile +10 -0
- data/gemfiles/rails_5_1.gemfile +10 -0
- data/gemfiles/rails_5_2.gemfile +10 -0
- data/gemfiles/rails_6_0.gemfile +9 -0
- data/lib/cucumber/rails/action_dispatch.rb +21 -0
- data/lib/cucumber/rails/application.rb +17 -8
- data/lib/cucumber/rails/capybara/javascript_emulation.rb +47 -39
- data/lib/cucumber/rails/capybara/select_dates_and_times.rb +8 -6
- data/lib/cucumber/rails/capybara.rb +2 -0
- data/lib/cucumber/rails/database.rb +36 -17
- data/lib/cucumber/rails/hooks/active_record.rb +14 -12
- data/lib/cucumber/rails/hooks/allow_rescue.rb +2 -0
- data/lib/cucumber/rails/hooks/database_cleaner.rb +6 -4
- data/lib/cucumber/rails/hooks/mail.rb +4 -4
- data/lib/cucumber/rails/hooks.rb +2 -0
- data/lib/cucumber/rails/rspec.rb +5 -3
- data/lib/cucumber/rails/world.rb +26 -9
- data/lib/cucumber/rails.rb +21 -18
- data/lib/generators/cucumber/{install/USAGE → USAGE} +2 -2
- data/lib/generators/cucumber/{install/install_generator.rb → install_generator.rb} +28 -15
- data/lib/generators/cucumber/{install/templates → templates}/config/cucumber.yml.erb +4 -3
- data/lib/generators/cucumber/{install/templates → templates}/script/cucumber +1 -0
- data/lib/generators/cucumber/{install/templates → templates}/support/_rails_each_run.rb.erb +4 -4
- 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 +2 -2
- data/lib/generators/cucumber/{install/templates → templates}/tasks/cucumber.rake.erb +19 -8
- data/spec/cucumber/rails/database_spec.rb +46 -33
- data/spec/generators/cucumber/install_generator_spec.rb +55 -0
- data/spec/spec_helper.rb +14 -2
- metadata +228 -142
- data/Gemfile.appraisal +0 -3
- data/features/step_definitions/mongo_steps.rb +0 -3
- data/features/support/bundler_pre_support.rb +0 -28
- 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 -290
- data/gemfiles/capybara_1_1.gemfile +0 -17
- data/gemfiles/rails_3_0.gemfile +0 -16
- data/gemfiles/rails_3_1.gemfile +0 -17
- data/gemfiles/rails_3_2.gemfile +0 -17
- data/gemfiles/rails_4_0.gemfile +0 -20
- data/lib/cucumber/rails/action_controller.rb +0 -12
- data/spec/generators/cucumber/install/install_generator_spec.rb +0 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eba00efc3e821aa337c9e16993ba558c1a5f1c795c5db9fb00104f5de38839cd
|
4
|
+
data.tar.gz: af9a02416bdeda7f9d3c1c3600df92ff2248788909c1f18ff333223c025e64cc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c711b5a237e9d4e9e53936e2d9836d74f58604a864769c91758a00a742649945e2a798ea4881b26466a21307bed029dac6f36f5dc54650e406133fd27d35c82e
|
7
|
+
data.tar.gz: 499ba57f75835fc6ca390e7c313e7dd442a1b92cddb30b516841892bd15223ecd41b595e885e7bb3dbe890847f7a1e03b0c9195656b0a6e7915d19af67d5d59d
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<!-- NAMING YOUR ISSUE: Please prefix your issue with the name of the sub-project -->
|
2
|
+
<!-- e.g. `event-protocol: Schemas out of date` -->
|
3
|
+
<!-- This makes it easier to get some context when reading the names of issues -->
|
4
|
+
|
5
|
+
<!-- These sections are meant as guidance for you, to help you give the kind of information we'll need to help with your issue. If a section doesn't seem to fit, just skip it.
|
6
|
+
|
7
|
+
In general: Please provide as much information as you can to help us solving your problem -->
|
8
|
+
|
9
|
+
## Summary
|
10
|
+
|
11
|
+
<!--- Provide a general summary description of the issue -->
|
12
|
+
|
13
|
+
## Expected Behavior
|
14
|
+
|
15
|
+
<!--- If you're describing a bug, tell us what should happen -->
|
16
|
+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
17
|
+
<!--- Feel free to use Given / Then / Then if that helps, but please add some plain-language context too -->
|
18
|
+
|
19
|
+
## Current Behavior
|
20
|
+
|
21
|
+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
22
|
+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
23
|
+
|
24
|
+
<!--- If you have got some output place it in the code block below. Otherwise remove it. -->
|
25
|
+
~~~
|
26
|
+
~~~
|
27
|
+
|
28
|
+
## Possible Solution
|
29
|
+
|
30
|
+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
31
|
+
<!--- or ideas how to implement the addition or change -->
|
32
|
+
|
33
|
+
## Steps to Reproduce (for bugs)
|
34
|
+
|
35
|
+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
|
36
|
+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
37
|
+
1.
|
38
|
+
2.
|
39
|
+
3.
|
40
|
+
4.
|
41
|
+
|
42
|
+
## Context & Motivation
|
43
|
+
|
44
|
+
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
45
|
+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
46
|
+
|
47
|
+
## Your Environment
|
48
|
+
|
49
|
+
<!--- If you're reporting a bug, include as many relevant details about the environment you experienced the bug in -->
|
50
|
+
* Version used:
|
51
|
+
* Operating System and version:
|
52
|
+
* Link to your project:
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<!-- NAMING YOUR PULL REQUEST: Please choose a concise, descriptive name for your pull request. -->
|
2
|
+
<!-- This makes it easier to get some context when reading the names of issues -->
|
3
|
+
|
4
|
+
<!-- These sections are meant as guidance for you. If something doesn't fit, you can just skip it. -->
|
5
|
+
|
6
|
+
## Summary
|
7
|
+
|
8
|
+
<!--- Provide a general summary description of your changes -->
|
9
|
+
|
10
|
+
## Details
|
11
|
+
|
12
|
+
<!--- Describe your changes in detail -->
|
13
|
+
|
14
|
+
## Motivation and Context
|
15
|
+
|
16
|
+
<!--- Why is this change required? What problem does it solve? -->
|
17
|
+
<!--- If it fixes an open issue, please link to the issue here. -->
|
18
|
+
|
19
|
+
## How Has This Been Tested?
|
20
|
+
|
21
|
+
<!--- Please add tests for changes to the code, otherwise we probably won't merge it -->
|
22
|
+
|
23
|
+
<!--- Please describe in detail how you tested your changes. -->
|
24
|
+
<!--- Include details of your testing environment, tests ran to see how -->
|
25
|
+
<!--- your change affects other areas of the code, etc. -->
|
26
|
+
|
27
|
+
## Screenshots (if appropriate):
|
28
|
+
|
29
|
+
## Types of changes
|
30
|
+
|
31
|
+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
32
|
+
- [ ] Bug fix (non-breaking change which fixes an issue).
|
33
|
+
- [ ] New feature (non-breaking change which adds functionality).
|
34
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
|
35
|
+
|
36
|
+
## Checklist:
|
37
|
+
|
38
|
+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
39
|
+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
40
|
+
- [ ] I've added tests for my code.
|
41
|
+
- [ ] My change requires a change to the documentation.
|
42
|
+
- [ ] I have updated the documentation accordingly.
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
- rubocop-performance
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.4
|
7
|
+
Exclude:
|
8
|
+
# These are auto-generated from a load of features that use aruba
|
9
|
+
- 'tmp/**/*'
|
10
|
+
# Generated by appraisal
|
11
|
+
- 'gemfiles/*.gemfile'
|
12
|
+
|
13
|
+
# These two areas will frequently break this limit, so we ignore the limit
|
14
|
+
Metrics/BlockLength:
|
15
|
+
Exclude:
|
16
|
+
- './spec/**/*_spec.rb'
|
17
|
+
- 'cucumber-rails.gemspec'
|
18
|
+
|
19
|
+
# This allows us to read the chmod action in a more reproducible way
|
20
|
+
Style/NumericLiteralPrefix:
|
21
|
+
EnforcedOctalStyle: zero_only
|
22
|
+
|
23
|
+
# Enable new cops
|
24
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
25
|
+
Enabled: true
|
26
|
+
Layout/SpaceAroundMethodCallOperator:
|
27
|
+
Enabled: true
|
28
|
+
Lint/DeprecatedOpenSSLConstant:
|
29
|
+
Enabled: true
|
30
|
+
Lint/MixedRegexpCaptureTypes:
|
31
|
+
Enabled: true
|
32
|
+
Lint/RaiseException:
|
33
|
+
Enabled: true
|
34
|
+
Lint/StructNewOverride:
|
35
|
+
Enabled: true
|
36
|
+
Style/ExponentialNotation:
|
37
|
+
Enabled: true
|
38
|
+
Style/HashEachMethods:
|
39
|
+
Enabled: true
|
40
|
+
Style/HashTransformKeys:
|
41
|
+
Enabled: true
|
42
|
+
Style/HashTransformValues:
|
43
|
+
Enabled: true
|
44
|
+
Style/RedundantRegexpCharacterClass:
|
45
|
+
Enabled: true
|
46
|
+
Style/RedundantRegexpEscape:
|
47
|
+
Enabled: true
|
48
|
+
Style/SlicingWithRange:
|
49
|
+
Enabled: true
|
50
|
+
|
51
|
+
## Cucumber Repo styles (Across implementations) ##
|
52
|
+
|
53
|
+
Layout/LineLength:
|
54
|
+
Max: 200
|
55
|
+
IgnoredPatterns:
|
56
|
+
- '^Given'
|
57
|
+
- '^When'
|
58
|
+
- '^Then'
|
59
|
+
|
60
|
+
Style/Documentation:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/RegexpLiteral:
|
64
|
+
EnforcedStyle: slashes
|
65
|
+
AllowInnerSlashes: true
|
66
|
+
|
67
|
+
RSpec/MessageSpies:
|
68
|
+
EnforcedStyle: receive
|
data/.travis.yml
CHANGED
@@ -1,35 +1,62 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
dist: bionic
|
4
|
+
|
5
|
+
rvm:
|
6
|
+
- 2.4
|
7
|
+
- 2.5
|
8
|
+
- 2.6
|
9
|
+
- 2.7
|
10
|
+
- ruby-head
|
11
|
+
|
12
|
+
addons:
|
13
|
+
firefox: latest
|
4
14
|
|
5
|
-
# whitelist
|
6
15
|
branches:
|
7
16
|
only:
|
8
17
|
- master
|
9
18
|
|
19
|
+
services:
|
20
|
+
- xvfb
|
21
|
+
|
10
22
|
gemfile:
|
11
|
-
- gemfiles/
|
12
|
-
- gemfiles/
|
13
|
-
- gemfiles/
|
14
|
-
- gemfiles/
|
15
|
-
- gemfiles/
|
23
|
+
- gemfiles/rails_6_0.gemfile
|
24
|
+
- gemfiles/rails_5_2.gemfile
|
25
|
+
- gemfiles/rails_5_1.gemfile
|
26
|
+
- gemfiles/rails_5_0.gemfile
|
27
|
+
- gemfiles/rails_4_2.gemfile
|
16
28
|
|
17
29
|
matrix:
|
30
|
+
fast_finish: true
|
31
|
+
allow_failures:
|
32
|
+
- rvm: ruby-head
|
18
33
|
exclude:
|
19
|
-
|
20
|
-
|
21
|
-
- rvm: 2.
|
22
|
-
gemfile: gemfiles/
|
23
|
-
- rvm: 2.
|
24
|
-
gemfile: gemfiles/
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
-
|
34
|
+
# Only test Rails6 on supported rubies
|
35
|
+
# Don't test lowest rails support on maintained rubies
|
36
|
+
- rvm: 2.4
|
37
|
+
gemfile: gemfiles/rails_6_0.gemfile
|
38
|
+
- rvm: 2.5
|
39
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
40
|
+
- rvm: 2.6
|
41
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
42
|
+
- rvm: 2.6
|
43
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
44
|
+
- rvm: 2.6
|
45
|
+
gemfile: gemfiles/rails_5_1.gemfile
|
46
|
+
- rvm: 2.7
|
47
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
48
|
+
- rvm: 2.7
|
49
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
50
|
+
- rvm: 2.7
|
51
|
+
gemfile: gemfiles/rails_5_1.gemfile
|
52
|
+
- rvm: ruby-head
|
53
|
+
gemfile: gemfiles/rails_4_2.gemfile
|
54
|
+
- rvm: ruby-head
|
55
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
56
|
+
- rvm: ruby-head
|
57
|
+
gemfile: gemfiles/rails_5_1.gemfile
|
58
|
+
|
59
|
+
before_install:
|
60
|
+
- gem install --remote bundler -v '~> 1.17'
|
61
|
+
- bin/install_geckodriver.sh
|
62
|
+
- bin/install_webpacker.sh
|
data/Appraisals
CHANGED
@@ -1,71 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
gem
|
5
|
-
gem
|
6
|
-
gem '
|
7
|
-
gem
|
8
|
-
gem 'sqlite3', "~> 1.3.7"
|
9
|
-
gem "bson_ext", "~> 1.8.5"
|
10
|
-
gem "mongoid", "~> 2.2.6"
|
11
|
-
gem 'database_cleaner', "~> 1.0.1"
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise 'rails_4_2' do
|
4
|
+
gem 'capybara', '< 3.16.0', platform: :mri_23
|
5
|
+
gem 'nokogiri', '< 1.9.1', platform: :mri_23
|
6
|
+
gem 'railties', '~> 4.2.11'
|
7
|
+
gem 'sqlite3', '~> 1.3.13'
|
12
8
|
end
|
13
9
|
|
14
|
-
appraise
|
15
|
-
gem
|
16
|
-
gem
|
17
|
-
gem '
|
18
|
-
gem
|
19
|
-
gem 'sass-rails', "~> 3.1.7"
|
20
|
-
gem 'coffee-rails', "~> 3.1.1"
|
21
|
-
gem 'jquery-rails', "~> 2.2.1"
|
22
|
-
gem "uglifier", "~> 2.1.0"
|
23
|
-
gem 'sqlite3', "~> 1.3.7"
|
24
|
-
gem "bson_ext", "~> 1.8.5"
|
25
|
-
gem 'database_cleaner', "~> 1.0.1"
|
10
|
+
appraise 'rails_5_0' do
|
11
|
+
gem 'capybara', '< 3.16.0', platform: :mri_23
|
12
|
+
gem 'nokogiri', '< 1.9.1', platform: :mri_23
|
13
|
+
gem 'railties', '~> 5.0.7'
|
14
|
+
gem 'sqlite3', '~> 1.3.13'
|
26
15
|
end
|
27
16
|
|
28
|
-
appraise
|
29
|
-
gem
|
30
|
-
gem
|
31
|
-
gem '
|
32
|
-
gem
|
33
|
-
gem 'sass-rails', "~> 3.2.6"
|
34
|
-
gem 'coffee-rails', "~> 3.2.2"
|
35
|
-
gem 'jquery-rails', "~> 2.2.1"
|
36
|
-
gem "uglifier", "~> 2.1.0"
|
37
|
-
gem 'sqlite3', "~> 1.3.7"
|
38
|
-
gem "bson_ext", "~> 1.8.5"
|
39
|
-
gem 'database_cleaner', "~> 1.0.1"
|
17
|
+
appraise 'rails_5_1' do
|
18
|
+
gem 'capybara', '< 3.16.0', platform: :mri_23
|
19
|
+
gem 'nokogiri', '< 1.9.1', platform: :mri_23
|
20
|
+
gem 'railties', '~> 5.1.7'
|
21
|
+
gem 'sqlite3', '~> 1.3.13'
|
40
22
|
end
|
41
23
|
|
42
|
-
appraise
|
43
|
-
gem
|
44
|
-
gem
|
45
|
-
gem '
|
46
|
-
gem
|
47
|
-
gem 'sass-rails', "~> 3.2.6"
|
48
|
-
gem 'coffee-rails', "~> 3.2.2"
|
49
|
-
gem 'jquery-rails', "~> 2.2.1"
|
50
|
-
gem "uglifier", "~> 2.1.0"
|
51
|
-
gem 'sqlite3', "~> 1.3.7"
|
52
|
-
gem "bson_ext", "~> 1.8.5"
|
53
|
-
gem 'database_cleaner', "~> 1.0.1"
|
24
|
+
appraise 'rails_5_2' do
|
25
|
+
gem 'capybara', '< 3.16.0', platform: :mri_23
|
26
|
+
gem 'nokogiri', '< 1.9.1', platform: :mri_23
|
27
|
+
gem 'railties', '~> 5.2.0'
|
28
|
+
gem 'sqlite3', '~> 1.3.13'
|
54
29
|
end
|
55
30
|
|
56
|
-
appraise
|
57
|
-
gem
|
58
|
-
gem
|
59
|
-
gem
|
60
|
-
|
61
|
-
gem 'turn', "~> 0.9.6"
|
62
|
-
gem "rspec-rails", "~> 2.12.2"
|
63
|
-
gem 'sass-rails', "~> 4.0.0"
|
64
|
-
gem 'coffee-rails', "~> 4.0.0"
|
65
|
-
gem 'jquery-rails', "~> 2.2.1"
|
66
|
-
gem "uglifier", "~> 2.1.0"
|
67
|
-
gem 'sqlite3', "~> 1.3.7"
|
68
|
-
gem "bson_ext", "~> 1.8.5"
|
69
|
-
gem 'mongoid', git: 'https://github.com/mongoid/mongoid.git'
|
70
|
-
gem 'database_cleaner', "~> 1.0.1"
|
71
|
-
end
|
31
|
+
appraise 'rails_6_0' do
|
32
|
+
gem 'railties', '~> 6.0.0'
|
33
|
+
gem 'rails', '~> 6.0.0'
|
34
|
+
gem 'sqlite3', '~> 1.4'
|
35
|
+
end
|