cucumber-rails 1.5.0 → 2.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.
Files changed (83) hide show
  1. checksums.yaml +5 -5
  2. data/.github/ISSUE_TEMPLATE.md +52 -0
  3. data/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  4. data/.gitignore +3 -1
  5. data/.rspec +4 -1
  6. data/.rubocop.yml +68 -0
  7. data/.travis.yml +43 -33
  8. data/Appraisals +25 -92
  9. data/{History.md → CHANGELOG.md} +242 -40
  10. data/CONTRIBUTING.md +15 -24
  11. data/Gemfile +2 -4
  12. data/LICENSE +1 -1
  13. data/README.md +57 -27
  14. data/Rakefile +18 -14
  15. data/bin/install_geckodriver.sh +19 -0
  16. data/bin/install_webpacker.sh +9 -0
  17. data/config/cucumber.yml +2 -5
  18. data/cucumber-rails.gemspec +35 -28
  19. data/dev_tasks/cucumber.rake +2 -0
  20. data/dev_tasks/rspec.rake +2 -0
  21. data/dev_tasks/yard.rake +7 -14
  22. data/dev_tasks/yard/default/layout/html/setup.rb +6 -1
  23. data/features/allow_rescue.feature +16 -11
  24. data/features/annotations.feature +8 -11
  25. data/features/capybara_javascript_drivers.feature +38 -28
  26. data/features/choose_javascript_database_strategy.feature +37 -57
  27. data/features/configuration.feature +48 -0
  28. data/features/database_cleaner.feature +18 -18
  29. data/features/disable_automatic_database_cleaning.feature +12 -18
  30. data/features/emulate_javascript.feature +64 -47
  31. data/features/install_cucumber_rails.feature +4 -4
  32. data/features/no_database.feature +8 -19
  33. data/features/raising_errors.feature +9 -3
  34. data/features/rerun_profile.feature +17 -7
  35. data/features/rest_api.feature +12 -12
  36. data/features/step_definitions/cucumber_rails_steps.rb +44 -88
  37. data/features/support/aruba.rb +3 -1
  38. data/features/support/cucumber_rails_helper.rb +85 -0
  39. data/features/support/env.rb +4 -30
  40. data/features/support/hooks.rb +8 -0
  41. data/gemfiles/rails_4_2.gemfile +5 -13
  42. data/gemfiles/rails_5_0.gemfile +5 -12
  43. data/gemfiles/rails_5_1.gemfile +4 -9
  44. data/gemfiles/rails_5_2.gemfile +10 -0
  45. data/gemfiles/rails_6_0.gemfile +9 -0
  46. data/lib/cucumber/rails.rb +17 -15
  47. data/lib/cucumber/rails/action_dispatch.rb +21 -0
  48. data/lib/cucumber/rails/application.rb +16 -7
  49. data/lib/cucumber/rails/capybara.rb +2 -0
  50. data/lib/cucumber/rails/capybara/javascript_emulation.rb +45 -37
  51. data/lib/cucumber/rails/capybara/select_dates_and_times.rb +6 -4
  52. data/lib/cucumber/rails/database.rb +30 -8
  53. data/lib/cucumber/rails/hooks.rb +2 -0
  54. data/lib/cucumber/rails/hooks/active_record.rb +14 -12
  55. data/lib/cucumber/rails/hooks/allow_rescue.rb +2 -0
  56. data/lib/cucumber/rails/hooks/database_cleaner.rb +6 -4
  57. data/lib/cucumber/rails/hooks/mail.rb +4 -4
  58. data/lib/cucumber/rails/rspec.rb +3 -1
  59. data/lib/cucumber/rails/world.rb +24 -7
  60. data/lib/generators/cucumber/{install/USAGE → USAGE} +0 -0
  61. data/lib/generators/cucumber/{install/install_generator.rb → install_generator.rb} +23 -10
  62. data/lib/generators/cucumber/{install/templates → templates}/config/cucumber.yml.erb +4 -3
  63. data/lib/generators/cucumber/{install/templates → templates}/script/cucumber +1 -0
  64. data/lib/generators/cucumber/{install/templates → templates}/support/_rails_each_run.rb.erb +2 -2
  65. data/lib/generators/cucumber/{install/templates → templates}/support/_rails_prefork.rb.erb +0 -0
  66. data/lib/generators/cucumber/{install/templates → templates}/support/capybara.rb +2 -0
  67. data/lib/generators/cucumber/{install/templates → templates}/support/edit_warning.txt +0 -0
  68. data/lib/generators/cucumber/{install/templates → templates}/support/rails.rb.erb +0 -0
  69. data/lib/generators/cucumber/{install/templates → templates}/support/rails_spork.rb.erb +0 -0
  70. data/lib/generators/cucumber/{install/templates → templates}/tasks/cucumber.rake.erb +9 -9
  71. data/spec/cucumber/rails/database_spec.rb +46 -33
  72. data/spec/generators/cucumber/{install/install_generator_spec.rb → install_generator_spec.rb} +17 -9
  73. data/spec/spec_helper.rb +13 -4
  74. metadata +105 -139
  75. data/Gemfile.appraisal +0 -3
  76. data/features/support/bundler_pre_support.rb +0 -28
  77. data/features/support/fixtures/bundler-1.0.21.gem +0 -0
  78. data/features/support/fixtures/bundler-1.1.rc.gem +0 -0
  79. data/features/support/legacy_web_steps_support.rb +0 -289
  80. data/gemfiles/lowest_version_bounds.gemfile +0 -26
  81. data/gemfiles/rails_4_0.gemfile +0 -19
  82. data/gemfiles/rails_4_1.gemfile +0 -18
  83. data/lib/cucumber/rails/action_controller.rb +0 -12
@@ -1,111 +1,67 @@
1
- module CucumberRailsHelper
2
- def rails_new(options = {})
3
- options[:name] ||= 'test_app'
4
- command = run "bundle exec rails new #{options[:name]} --skip-bundle --skip-test-unit --skip-spring #{options[:args]}"
5
- expect(command).to have_output /README/
6
- expect(last_command_started).to be_successfully_executed
7
- cd options[:name]
8
- delete_environment_variable 'RUBYOPT'
9
- delete_environment_variable 'BUNDLE_BIN_PATH'
10
- delete_environment_variable 'BUNDLE_GEMFILE'
11
- # Force older version of nokogiri on older Rubies
12
- gem 'nokogiri', '~> 1.6.8' if RUBY_VERSION < '2.1.0'
13
- run_simple 'bundle install'
14
- end
15
-
16
- def install_cucumber_rails(*options)
17
- if options.include?(:not_in_test_group)
18
- gem 'cucumber-rails', path: "#{File.expand_path('.')}"
19
- else
20
- gem 'cucumber-rails' , group: :test, require: false, path: "#{File.expand_path('.')}"
21
- end
22
- # From Rails 5.1 some gems are already part of the Gemfile
23
- if Gem.loaded_specs['rails'].version < Gem::Version.new('5.1.0')
24
- gem 'capybara', group: :test
25
- gem 'selenium-webdriver', group: :test
26
- else
27
- # Make sure to restrict the selected selenium-webdriver version
28
- # Since version 3 geckodriver is required to be installed
29
- gemfile_text = File.read(expand_path('Gemfile'))
30
- gemfile_text.gsub!("gem 'selenium-webdriver'", "gem 'selenium-webdriver', '~> 2.0'")
31
- overwrite_file('Gemfile', gemfile_text)
32
- end
33
- gem 'rspec-rails', group: :test
34
- gem 'database_cleaner', group: :test unless options.include?(:no_database_cleaner)
35
- gem 'factory_girl', group: :test unless options.include?(:no_factory_girl)
36
- # Newer versions of rake remove a method used by RSpec older versions
37
- # See https://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11#35893625
38
- if Gem::Version.new(RSpec::Support::Version::STRING) < Gem::Version.new('3.4.4')
39
- gem 'rake', '< 11.0'
40
- run_simple 'bundle update rake --local'
41
- end
42
- run_simple 'bundle exec rails generate cucumber:install'
43
- end
44
-
45
- def gem(name, options)
46
- line = %{gem "#{name}", #{options.inspect}\n}
47
- append_to_file('Gemfile', line)
48
- end
49
-
50
- def prepare_aruba_report
51
- if(ENV['ARUBA_REPORT_DIR'])
52
- @aruba_report_start = Time.new
53
- sleep(1)
54
- end
55
- end
56
-
57
- def fixture(path)
58
- File.expand_path(File.dirname(__FILE__) + "./../support/fixtures/#{path}")
59
- end
60
- end
61
- World(CucumberRailsHelper)
1
+ # frozen_string_literal: true
62
2
 
63
- Given /^I have created a new Rails app and installed cucumber\-rails, accidentally outside of the test group in my Gemfile$/ do
3
+ Given('I have created a new Rails app and installed cucumber-rails, accidentally outside of the test group in my Gemfile') do
64
4
  rails_new
65
5
  install_cucumber_rails :not_in_test_group
66
- create_web_steps
67
- prepare_aruba_report
68
6
  end
69
7
 
70
- Given /^I have created a new Rails app "([^"]*)" and installed cucumber\-rails$/ do |app_name|
71
- rails_new name: app_name
72
- install_cucumber_rails
73
- create_web_steps
74
- prepare_aruba_report
75
- end
76
-
77
- Given /^I have created a new Rails app and installed cucumber\-rails$/ do
8
+ Given('I have created a new Rails app and installed cucumber-rails') do
78
9
  rails_new
79
10
  install_cucumber_rails
80
- create_web_steps
81
- prepare_aruba_report
82
11
  end
83
12
 
84
- Given /^I have created a new Rails app with no database and installed cucumber-rails$/ do
13
+ Given('I have created a new Rails app with no database and installed cucumber-rails') do
85
14
  rails_new args: '--skip-active-record'
86
- install_cucumber_rails :no_database_cleaner, :no_factory_girl
15
+ install_cucumber_rails :no_database_cleaner, :no_factory_bot
87
16
  overwrite_file('features/support/env.rb', "require 'cucumber/rails'\n")
88
- create_web_steps
89
17
  end
90
18
 
91
- Given /^I have created a new Rails app "(.*?)" with no database and installed cucumber\-rails$/ do |app_name|
92
- rails_new name: app_name, args: '--skip-active-record'
93
- install_cucumber_rails :no_database_cleaner, :no_factory_girl
94
- overwrite_file('features/support/env.rb', "require 'cucumber/rails'\n")
95
- create_web_steps
19
+ Given('I have a {string} ActiveRecord model object') do |name|
20
+ run_command_and_stop("bundle exec rails g model #{name}")
21
+ run_command_and_stop('bundle exec rake db:migrate RAILS_ENV=test')
22
+ end
23
+
24
+ Given('I remove the {string} gem from the Gemfile') do |gem_name|
25
+ content = File.open(expand_path('Gemfile'), 'r').readlines
26
+ new_content = []
27
+
28
+ content.each do |line|
29
+ next if /gem ["|']#{gem_name}["|'].*/.match?(line)
30
+
31
+ new_content << line
32
+ end
33
+
34
+ overwrite_file('Gemfile', new_content.join("\r\n"))
96
35
  end
97
36
 
98
- Given /^I have a "([^"]*)" ActiveRecord model object$/ do |name|
99
- run_simple("bundle exec rails g model #{name}")
100
- run_simple('bundle exec rake db:migrate RAILS_ENV=test')
37
+ Given('I force selenium to run Firefox in headless mode') do
38
+ selenium_config = %{
39
+ Capybara.register_driver :selenium do |app|
40
+ http_client = Selenium::WebDriver::Remote::Http::Default.new
41
+ http_client.read_timeout = 180
42
+
43
+ browser_options = Selenium::WebDriver::Firefox::Options.new
44
+ browser_options.args << '--headless'
45
+ Capybara::Selenium::Driver.new(
46
+ app,
47
+ browser: :firefox,
48
+ options: browser_options,
49
+ http_client: http_client
50
+ )
51
+ end
52
+
53
+ Capybara.server = :webrick
54
+ }
55
+
56
+ step 'I append to "features/support/env.rb" with:', selenium_config
101
57
  end
102
58
 
103
- When /^I run the cukes$/ do
104
- run_simple('bundle exec cucumber')
59
+ When('I run the cukes') do
60
+ run_command_and_stop('bundle exec cucumber')
105
61
  end
106
62
 
107
63
  # Copied from Aruba
108
- Then /^the feature run should pass with:$/ do |string|
64
+ Then('the feature run should pass with:') do |string|
109
65
  step 'the output should not contain " failed)"'
110
66
  step 'the output should not contain " undefined)"'
111
67
  step 'the exit status should be 0'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Aruba.configure do |config|
2
- config.exit_timeout = 120
4
+ config.exit_timeout = 360
3
5
  end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CucumberRailsHelper
4
+ def rails_new(options = {})
5
+ validate_rails_new_success(run_rails_new_command(options))
6
+ clear_bundle_env_vars(options[:name])
7
+ end
8
+
9
+ def install_cucumber_rails(*options)
10
+ add_conditional_gems(options)
11
+
12
+ add_gem 'capybara', group: :test
13
+ add_gem 'selenium-webdriver', '~> 3.11', group: :test
14
+ add_gem 'rspec-expectations', '~> 3.7', group: :test
15
+ add_gem 'database_cleaner', '>= 1.8.0', group: :test unless options.include?(:no_database_cleaner)
16
+ add_gem 'factory_bot', '>= 3.2', group: :test unless options.include?(:no_factory_bot)
17
+
18
+ run_command_and_stop 'bundle install'
19
+ run_command_and_stop 'bundle exec rails webpacker:install' if rails6?
20
+ run_command_and_stop 'bundle exec rails generate cucumber:install'
21
+ end
22
+
23
+ def add_gem(name, *args)
24
+ line = convert_gem_opts_to_string(name, *args)
25
+ gem_regexp = /gem ["']#{name}["'].*$/
26
+ gemfile_content = File.read(expand_path('Gemfile'))
27
+
28
+ if gemfile_content&.match?(gem_regexp)
29
+ updated_gemfile_content = gemfile_content.gsub(gem_regexp, line)
30
+ overwrite_file('Gemfile', updated_gemfile_content)
31
+ else
32
+ append_to_file('Gemfile', line)
33
+ end
34
+ end
35
+
36
+ private
37
+
38
+ def run_rails_new_command(options)
39
+ options[:name] ||= 'test_app'
40
+ flags = '--skip-bundle --skip-test-unit --skip-spring --skip-bootsnap'
41
+ flags += ' --skip-webpack-install' if rails6?
42
+ run_command "bundle exec rails new #{options[:name]} #{flags} #{options[:args]}"
43
+ end
44
+
45
+ def validate_rails_new_success(result)
46
+ expect(result).to have_output(/README/)
47
+ expect(last_command_started).to be_successfully_executed
48
+ end
49
+
50
+ def clear_bundle_env_vars(dir)
51
+ cd dir
52
+ delete_environment_variable 'RUBYOPT'
53
+ delete_environment_variable 'BUNDLE_BIN_PATH'
54
+ delete_environment_variable 'BUNDLE_GEMFILE'
55
+ end
56
+
57
+ def rails6?
58
+ `bundle exec rails -v`.start_with?('Rails 6')
59
+ end
60
+
61
+ def add_conditional_gems(options)
62
+ if options.include?(:not_in_test_group)
63
+ add_gem 'cucumber-rails', path: File.expand_path('.').to_s
64
+ else
65
+ add_gem 'cucumber-rails', group: :test, require: false, path: File.expand_path('.').to_s
66
+ end
67
+
68
+ if rails6?
69
+ add_gem 'sqlite3', '~> 1.4'
70
+ else
71
+ add_gem 'sqlite3', '~> 1.3.13'
72
+ end
73
+ end
74
+
75
+ def convert_gem_opts_to_string(name, *args)
76
+ options = args.last.is_a?(Hash) ? args.pop : {}
77
+ parts = ["'#{name}'"]
78
+ parts << args.map(&:inspect) if args.any?
79
+ parts << options.inspect[1..-2] if options.any?
80
+ new_parts = parts.flatten.map { |part| part.gsub(/:(\w+)=>/, '\1: ') }
81
+ "gem #{new_parts.join(', ')}\n"
82
+ end
83
+ end
84
+
85
+ World(CucumberRailsHelper)
@@ -1,32 +1,6 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
2
- require 'rubygems'
3
- require 'bundler/setup'
4
- require 'rspec/expectations'
5
- require 'aruba/cucumber'
6
-
7
- if(ENV['ARUBA_REPORT_DIR'])
8
- # Override reporting behaviour so we don't document all files, only the ones
9
- # that have been created after @aruba_report_start (a Time object). This is
10
- # given a value after the Rails app is generated (see cucumber_rails_steps.rb)
11
- module Aruba
12
- module Reporting
13
- def children(dir)
14
- children = Dir["#{dir}/*"].sort
1
+ # frozen_string_literal: true
15
2
 
16
- # include
17
- children = children.select do |child|
18
- File.directory?(child) ||
19
- (@aruba_report_start && File.stat(child).mtime > @aruba_report_start)
20
- end
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
21
4
 
22
- # exclude
23
- children = children.reject do |child|
24
- child =~ /Gemfile/ ||
25
- child =~ /\.log$/
26
- end
27
-
28
- children
29
- end
30
- end
31
- end
32
- end
5
+ require 'rspec/expectations'
6
+ require 'aruba/cucumber'
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ After do |scenario|
4
+ if scenario.failed?
5
+ puts last_command_stopped.stdout
6
+ puts last_command_stopped.stderr
7
+ end
8
+ end
@@ -2,17 +2,9 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.2.1"
6
- gem "railties", "~> 4.2.1"
7
- gem "capybara", "~> 2.4.4"
8
- gem "selenium-webdriver", "~> 2.0"
9
- gem "rspec-rails", "~> 3.1.0"
10
- gem "sass-rails", "~> 5.0"
11
- gem "coffee-rails", "~> 4.1.0"
12
- gem "jquery-rails"
13
- gem "uglifier", "~> 2.1.0"
14
- gem "sqlite3", "~> 1.3.7"
15
- gem "database_cleaner", "~> 1.0.1"
16
- gem "rake", "< 11.0"
5
+ gem "capybara", "< 3.16.0", platform: :mri_23
6
+ gem "nokogiri", "< 1.9.1", platform: :mri_23
7
+ gem "railties", "~> 4.2.11"
8
+ gem "sqlite3", "~> 1.3.13"
17
9
 
18
- gemspec :path => "../"
10
+ gemspec path: "../"
@@ -2,16 +2,9 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 5.0.0"
6
- gem "railties", "~> 5.0.0"
7
- gem "capybara", "~> 2.7.1"
8
- gem "selenium-webdriver", "~> 2.0"
9
- gem "rspec-rails", "~> 3.5.0"
10
- gem "sass-rails", "~> 5.0"
11
- gem "coffee-rails", "~> 4.2.0"
12
- gem "jquery-rails"
13
- gem "uglifier", "~> 2.7.2"
14
- gem "sqlite3", "~> 1.3.7"
15
- gem "database_cleaner", ">= 1.1.0"
5
+ gem "capybara", "< 3.16.0", platform: :mri_23
6
+ gem "nokogiri", "< 1.9.1", platform: :mri_23
7
+ gem "railties", "~> 5.0.7"
8
+ gem "sqlite3", "~> 1.3.13"
16
9
 
17
- gemspec :path => "../"
10
+ gemspec path: "../"
@@ -2,14 +2,9 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 5.1.0"
6
- gem "railties", "~> 5.1.0"
7
- gem "selenium-webdriver", "~> 2.0"
8
- gem "rspec-rails", "~> 3.5.0"
9
- gem "sass-rails", "~> 5.0"
10
- gem "coffee-rails", "~> 4.2.0"
11
- gem "uglifier", "~> 3.2.0"
5
+ gem "capybara", "< 3.16.0", platform: :mri_23
6
+ gem "nokogiri", "< 1.9.1", platform: :mri_23
7
+ gem "railties", "~> 5.1.7"
12
8
  gem "sqlite3", "~> 1.3.13"
13
- gem "database_cleaner", ">= 1.1.0"
14
9
 
15
- gemspec :path => "../"
10
+ gemspec path: "../"
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "capybara", "< 3.16.0", platform: :mri_23
6
+ gem "nokogiri", "< 1.9.1", platform: :mri_23
7
+ gem "railties", "~> 5.2.0"
8
+ gem "sqlite3", "~> 1.3.13"
9
+
10
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "railties", "~> 6.0.0"
6
+ gem "rails", "~> 6.0.0"
7
+ gem "sqlite3", "~> 1.4"
8
+
9
+ gemspec path: "../"
@@ -1,21 +1,22 @@
1
- env_caller = File.dirname(caller.detect{ |f| f =~ /\/env\.rb:/ }) if caller.detect{ |f| f =~ /\/env\.rb:/ }
2
- if env_caller
1
+ # frozen_string_literal: true
2
+
3
+ called_from_env_rb = caller.detect { |f| f =~ /\/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
11
  ENV['RAILS_ROOT'] ||= File.expand_path(env_caller + '/../..')
7
12
  require File.expand_path(ENV['RAILS_ROOT'] + '/config/environment')
8
- require 'cucumber/rails/action_controller'
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
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 (most likely in config/environments/cucumber.rb). This setting is known to cause problems with database transactions. Set config.cache_classes to true if you want to use transactions."
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'
@@ -25,7 +26,8 @@ if env_caller
25
26
 
26
27
  MultiTest.disable_autorun
27
28
  else
28
- warn "WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred until env.rb is called.
29
- To avoid this warning, move 'gem \'cucumber-rails\', :require => false' under only group :test in your Gemfile.
30
- If already in the :test group, be sure you are specifying ':require => false'."
29
+ warn "WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being deferred
30
+ until env.rb is called. To avoid this warning, move 'gem \'cucumber-rails\', require: false'
31
+ under only group :test in your Gemfile. If already in the :test group, be sure you are
32
+ specifying 'require: false'."
31
33
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ ActionController::Base.class_eval do
4
+ cattr_accessor :allow_rescue
5
+ end
6
+
7
+ module Cucumber
8
+ module Rails
9
+ module ActionDispatch
10
+ module ShowExceptions
11
+ def call(env)
12
+ env['action_dispatch.show_detailed_exceptions'] = !ActionController::Base.allow_rescue
13
+ env['action_dispatch.show_exceptions'] = !env['action_dispatch.show_detailed_exceptions']
14
+ super(env)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ ActionDispatch::ShowExceptions.prepend(Cucumber::Rails::ActionDispatch::ShowExceptions)