]> git.openstreetmap.org Git - rails.git/commitdiff
Remove minitest-rails-capybara and convert feature tests to system tests
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 29 Nov 2017 12:33:03 +0000 (12:33 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 29 Nov 2017 12:33:03 +0000 (12:33 +0000)
Gemfile
Gemfile.lock
test/features/can_access_home_test.rb [deleted file]
test/system/issues_test.rb [moved from test/features/issues_test.rb with 92% similarity]
test/system/report_diary_entry_test.rb [moved from test/features/report_diary_entry_test.rb with 90% similarity]
test/test_helper.rb

diff --git a/Gemfile b/Gemfile
index 43f39340a812d78ad5ad660ffada06872d2a2fc0..67a3a1f5ede13ba7b9d80fc9cb5cd77ae6d7d6c9 100644 (file)
--- 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"
index d67d34d4723d4a670c57f156350b966e8e0998af..50833ef44939bada55fb19db11cad175e7f19ed6 100644 (file)
@@ -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 (file)
index 396ffc9..0000000
+++ /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
similarity index 92%
rename from test/features/issues_test.rb
rename to test/system/issues_test.rb
index 04ff7f5a6d148931593549f2bc62e83114524336..1c42bc10b5a7c8c646ee6581bfb9f168c07dbcd2 100644 (file)
@@ -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))
 
similarity index 90%
rename from test/features/report_diary_entry_test.rb
rename to test/system/report_diary_entry_test.rb
index 820b5f77ba1d17b57f9b2c35d06165403a964c86..36cd3603053de80f392d2b92d9d352a3ccc078bc 100644 (file)
@@ -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)
index 552bda7d538c02af9e24509f138cd4152d87c0da..02f9665d7840fb89795cbc854e0ff8d31ad47f20 100644 (file)
@@ -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