diff options
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/driver.rb | 6 | ||||
-rw-r--r-- | actionpack/test/dispatch/system_testing/driver_test.rb | 4 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 42 |
3 files changed, 45 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb index 1a027f2e23..81e6f0fc80 100644 --- a/actionpack/lib/action_dispatch/system_testing/driver.rb +++ b/actionpack/lib/action_dispatch/system_testing/driver.rb @@ -9,14 +9,14 @@ module ActionDispatch end def use - register unless rack_test? + register if registerable? setup end private - def rack_test? - @name == :rack_test + def registerable? + [:selenium, :poltergeist, :webkit].include?(@name) end def register diff --git a/actionpack/test/dispatch/system_testing/driver_test.rb b/actionpack/test/dispatch/system_testing/driver_test.rb index 4a1b971da5..34d27671bb 100644 --- a/actionpack/test/dispatch/system_testing/driver_test.rb +++ b/actionpack/test/dispatch/system_testing/driver_test.rb @@ -29,7 +29,7 @@ class DriverTest < ActiveSupport::TestCase assert_equal ({ skip_image_loading: true }), driver.instance_variable_get(:@options) end - test "rack_test? returns false if driver is poltergeist" do - assert_not ActionDispatch::SystemTesting::Driver.new(:poltergeist).send(:rack_test?) + test "registerable? returns false if driver is rack_test" do + assert_not ActionDispatch::SystemTesting::Driver.new(:rack_test).send(:registerable?) end end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 9364f11a98..059c2692be 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -8,32 +8,70 @@ DEFAULT_APP_FILES = %w( Gemfile Rakefile config.ru + app/assets/config/manifest.js + app/assets/images app/assets/javascripts + app/assets/javascripts/application.js + app/assets/javascripts/cable.js + app/assets/javascripts/channels app/assets/stylesheets - app/assets/images + app/assets/stylesheets/application.css + app/channels/application_cable/channel.rb + app/channels/application_cable/connection.rb app/controllers + app/controllers/application_controller.rb app/controllers/concerns app/helpers + app/helpers/application_helper.rb app/mailers + app/mailers/application_mailer.rb app/models + app/models/application_record.rb app/models/concerns app/jobs + app/jobs/application_job.rb app/views/layouts + app/views/layouts/application.html.erb + app/views/layouts/mailer.html.erb + app/views/layouts/mailer.text.erb bin/bundle bin/rails bin/rake bin/setup + bin/update + bin/yarn + config/application.rb + config/boot.rb + config/cable.yml + config/environment.rb config/environments + config/environments/development.rb + config/environments/production.rb + config/environments/test.rb config/initializers + config/initializers/application_controller_renderer.rb + config/initializers/assets.rb + config/initializers/backtrace_silencers.rb + config/initializers/cookies_serializer.rb + config/initializers/filter_parameter_logging.rb + config/initializers/inflections.rb + config/initializers/mime_types.rb + config/initializers/wrap_parameters.rb config/locales - config/cable.yml + config/locales/en.yml config/puma.rb + config/routes.rb + config/secrets.yml config/spring.rb db + db/seeds.rb lib lib/tasks lib/assets log + package.json + public + test/application_system_test_case.rb test/test_helper.rb test/fixtures test/fixtures/files |