From 2700289ff8d43167bff5a967ac49f6c8450769a5 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 30 Oct 2020 16:38:38 +0100 Subject: [PATCH] Capybara test initializer removed Apparently "system tests" are a better way to handle them. --- Gemfile | 4 ---- Gemfile.lock | 20 -------------------- test/test_helper.rb | 24 ------------------------ 3 files changed, 48 deletions(-) diff --git a/Gemfile b/Gemfile index 54e08d7..b718349 100644 --- a/Gemfile +++ b/Gemfile @@ -79,10 +79,6 @@ group :development, :test do gem 'byebug', platform: :mri end -group :test do - gem "minitest-rails-capybara" -end - # TODO… https://github.com/galetahub/simple-captcha # Captcha for anonymous reports # gem "galetahub-simple_captcha", :require => "simple_captcha" diff --git a/Gemfile.lock b/Gemfile.lock index 8767ca9..bf262d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,8 +64,6 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) ansi (1.5.0) ast (2.4.1) babel-source (5.8.35) @@ -86,14 +84,6 @@ GEM msgpack (~> 1.0) builder (3.2.4) byebug (11.1.3) - capybara (3.33.0) - addressable - mini_mime (>= 0.1.3) - nokogiri (~> 1.8) - rack (>= 1.6.0) - rack-test (>= 0.6.3) - regexp_parser (~> 1.5) - xpath (~> 3.2) choice (0.2.0) climate_control (0.2.0) coderay (1.1.3) @@ -111,8 +101,6 @@ GEM e2mmap (0.1.0) erubi (1.9.0) execjs (2.7.0) - fancybox-rails (0.3.1) - railties (>= 3.1.0) faraday (1.0.1) multipart-post (>= 1.2, < 3) ffi (1.13.1) @@ -185,9 +173,6 @@ GEM minitest-rails (6.0.1) minitest (~> 5.10) railties (~> 6.0.0) - minitest-rails-capybara (0.0.2) - capybara - minitest-rails minitest-reporters (1.4.2) ansi builder @@ -243,7 +228,6 @@ GEM pg_search (2.3.2) activerecord (>= 5.2) activesupport (>= 5.2) - public_suffix (4.0.5) puma (3.12.6) rack (2.2.3) rack-contrib (2.2.0) @@ -396,8 +380,6 @@ GEM will_paginate (3.3.0) will_paginate-foundation (6.2.1) will_paginate (>= 3.0.3) - xpath (3.2.0) - nokogiri (~> 1.8) yard (0.9.25) zeitwerk (2.4.0) @@ -413,7 +395,6 @@ DEPENDENCIES bzip2-ruby! cookies_eu devise - fancybox-rails font-awesome-rails foundation-rails (~> 6.6) guard-minitest @@ -425,7 +406,6 @@ DEPENDENCIES meta_request mini_magick minitest-rails - minitest-rails-capybara minitest-reporters omniauth omniauth-amazon diff --git a/test/test_helper.rb b/test/test_helper.rb index d381db6..59f80b7 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -8,12 +8,6 @@ Minitest::Reporters.use! # require "minitest/rails" # require "minitest/autorun" -# To add Capybara feature tests add `gem "minitest-rails-capybara"` -# to the test group in the Gemfile and uncomment the following: -require "minitest/rails/capybara" -require 'capybara/rails' -require 'capybara/minitest' - # Uncomment for awesome colorful output require "minitest/pride" @@ -25,21 +19,3 @@ end class ActionController::TestCase include Devise::Test::ControllerHelpers end - -# Capybara-based tests -class ActionDispatch::IntegrationTest - # Make the Capybara DSL available in all integration tests - include Capybara::DSL - # Make `assert_*` methods behave like Minitest assertions - include Capybara::Minitest::Assertions - - # Help simulate logins - include Devise::Test::IntegrationHelpers - - # Reset sessions and driver between tests - # Use super wherever this method is redefined in your individual test classes - def teardown - Capybara.reset_sessions! - Capybara.use_default_driver - end -end