From 3115fd41b178e76bd1932ffb2c051407a4020e8e Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 29 Nov 2017 12:33:03 +0000 Subject: [PATCH 1/1] Remove minitest-rails-capybara and convert feature tests to system tests --- Gemfile | 1 - Gemfile.lock | 15 --------------- test/features/can_access_home_test.rb | 12 ------------ test/{features => system}/issues_test.rb | 4 ++-- .../report_diary_entry_test.rb | 4 ++-- test/test_helper.rb | 1 - 6 files changed, 4 insertions(+), 33 deletions(-) delete mode 100644 test/features/can_access_home_test.rb rename test/{features => system}/issues_test.rb (92%) rename test/{features => system}/report_diary_entry_test.rb (90%) diff --git a/Gemfile b/Gemfile index 43f39340a..67a3a1f5e 100644 --- a/Gemfile +++ b/Gemfile @@ -115,7 +115,6 @@ end # Gems needed for running tests group :test do gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20] - gem "minitest-rails-capybara" gem "rails-controller-testing" gem "rubocop" gem "webmock" diff --git a/Gemfile.lock b/Gemfile.lock index d67d34d47..50833ef44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -163,20 +163,6 @@ GEM mini_mime (0.1.4) mini_portile2 (2.3.0) minitest (5.10.3) - minitest-capybara (0.8.2) - capybara (~> 2.2) - minitest (~> 5.0) - rake - minitest-metadata (0.6.0) - minitest (>= 4.7, < 6.0) - minitest-rails (3.0.0) - minitest (~> 5.8) - railties (~> 5.0) - minitest-rails-capybara (3.0.1) - capybara (~> 2.7) - minitest-capybara (~> 0.8) - minitest-metadata (~> 0.6) - minitest-rails (~> 3.0) multi_json (1.12.2) multi_xml (0.6.0) multipart-post (2.0.0) @@ -398,7 +384,6 @@ DEPENDENCIES listen logstasher minitest (~> 5.1) - minitest-rails-capybara oauth-plugin (>= 0.5.1) omniauth omniauth-facebook diff --git a/test/features/can_access_home_test.rb b/test/features/can_access_home_test.rb deleted file mode 100644 index 396ffc927..000000000 --- a/test/features/can_access_home_test.rb +++ /dev/null @@ -1,12 +0,0 @@ -require "test_helper" - -class CanAccessHomeTest < Capybara::Rails::TestCase - def setup - stub_hostip_requests - end - - def test_it_works - visit root_path - assert page.has_content? "BOpenStreetMap" - end -end diff --git a/test/features/issues_test.rb b/test/system/issues_test.rb similarity index 92% rename from test/features/issues_test.rb rename to test/system/issues_test.rb index 04ff7f5a6..1c42bc10b 100644 --- a/test/features/issues_test.rb +++ b/test/system/issues_test.rb @@ -1,6 +1,6 @@ -require "test_helper" +require "application_system_test_case" -class IssuesTest < Capybara::Rails::TestCase +class IssuesTest < ApplicationSystemTestCase def test_view_issues_normal_user sign_in_as(create(:user)) diff --git a/test/features/report_diary_entry_test.rb b/test/system/report_diary_entry_test.rb similarity index 90% rename from test/features/report_diary_entry_test.rb rename to test/system/report_diary_entry_test.rb index 820b5f77b..36cd36030 100644 --- a/test/features/report_diary_entry_test.rb +++ b/test/system/report_diary_entry_test.rb @@ -1,6 +1,6 @@ -require "test_helper" +require "application_system_test_case" -class ReportDiaryEntryTest < Capybara::Rails::TestCase +class ReportDiaryEntryTest < ApplicationSystemTestCase def setup create(:language, :code => "en") @diary_entry = create(:diary_entry) diff --git a/test/test_helper.rb b/test/test_helper.rb index 552bda7d5..02f9665d7 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -5,7 +5,6 @@ ENV["RAILS_ENV"] = "test" require File.expand_path("../../config/environment", __FILE__) require "rails/test_help" require "webmock/minitest" -require "minitest/rails/capybara" module ActiveSupport class TestCase -- 2.39.5