diff --git a/Gemfile b/Gemfile index a23d482703..ac9c63790c 100644 --- a/Gemfile +++ b/Gemfile @@ -27,9 +27,6 @@ gem "memcache-client", ">= 1.8.5" # AM gem "text-format", "~> 1.0.0" -# for 'plugin new --full' generator -gem "capybara" - platforms :mri_18 do gem "system_timer" gem "ruby-debug", ">= 0.10.3" diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index ddc801a0ae..ef3ded424d 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -39,7 +39,6 @@ module Rails template "test/%name%_test.rb" if full? template "test/integration/navigation_test.rb" - template "test/support/integration_case.rb" end end diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile b/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile index 7ce44a3d52..928ea8b9c4 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile @@ -3,7 +3,6 @@ source "http://rubygems.org" <%= rails_gemfile_entry -%> <% if full? -%> - gem "capybara", ">= 0.3.9" gem "sqlite3-ruby", :require => "sqlite3" <% end -%> diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/integration/navigation_test.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/integration/navigation_test.rb index 42721899c8..d06fe7cbd0 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/test/integration/navigation_test.rb +++ b/railties/lib/rails/generators/rails/plugin_new/templates/test/integration/navigation_test.rb @@ -1,7 +1,11 @@ require 'test_helper' -class NagivationTest < ActiveSupport::IntegrationCase - test "truth" do - assert_kind_of Dummy::Application, Rails.application +class NavigationTest < ActionDispatch::IntegrationTest + fixtures :all + + # Replace this with your real tests. + test "the truth" do + assert true end end + diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/support/integration_case.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/support/integration_case.rb deleted file mode 100644 index 4cfe3f0e71..0000000000 --- a/railties/lib/rails/generators/rails/plugin_new/templates/test/support/integration_case.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Define a bare test case to use with Capybara -class ActiveSupport::IntegrationCase < ActiveSupport::TestCase - include Capybara - include Rails.application.routes.url_helpers -end \ No newline at end of file diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb index 4562c88a54..b42e45d544 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/plugin_new/templates/test/test_helper.rb @@ -7,11 +7,6 @@ require "rails/test_help" Rails.backtrace_cleaner.remove_silencers! <% if full? -%> -# Configure capybara for integration testing -require "capybara/rails" -Capybara.default_driver = :rack_test -Capybara.default_selector = :css - # Run any available migration from application ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__) # and from engine diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 985ef088e5..aebd954215 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -46,11 +46,9 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase def test_generating_test_files_in_full_mode run_generator [destination_root, "--full"] - assert_directory "test/support/" assert_directory "test/integration/" - assert_file "test/integration/navigation_test.rb", /assert_kind_of Dummy::Application, Rails.application/ - assert_file "test/support/integration_case.rb", /class ActiveSupport::IntegrationCase/ + assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/ end def test_ensure_that_plugin_options_are_not_passed_to_app_generator