From 1a0ca84a064b07ecab798793a3d7ebe89bb6367c Mon Sep 17 00:00:00 2001 From: eileencodes Date: Sun, 19 Feb 2017 11:50:42 -0500 Subject: Move and rename system tests * Move system tests back into Action Pack * Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase` * Remove private base module and only make file for public `SystemTestCase` class, name private module `SystemTesting` * Rename `ActionSystemTestCase` to `ApplicationSystemTestCase` * Update corresponding documentation and guides * Delete old `ActionSystemTest` files --- guides/source/testing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'guides/source') diff --git a/guides/source/testing.md b/guides/source/testing.md index 5b8e14f296..366ab0b2a1 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -367,7 +367,7 @@ All the basic assertions such as `assert_equal` defined in `Minitest::Assertions * [`ActionView::TestCase`](http://api.rubyonrails.org/classes/ActionView/TestCase.html) * [`ActionDispatch::IntegrationTest`](http://api.rubyonrails.org/classes/ActionDispatch/IntegrationTest.html) * [`ActiveJob::TestCase`](http://api.rubyonrails.org/classes/ActiveJob/TestCase.html) -* [`ActionSystemTestCase`](http://api.rubyonrails.org/classes/ActionSystemTest.html) +* [`ActionDispatch::SystemTestCase`](http://api.rubyonrails.org/classes/ActionDispatch/SystemTestCase.html) Each of these classes include `Minitest::Assertions`, allowing us to use all of the basic assertions in our tests. @@ -620,7 +620,7 @@ Here's what a freshly-generated system test looks like: ```ruby require "system_test_helper" -class UsersCreateTest < ActionSystemTestCase +class UsersCreateTest < ApplicationSystemTestCase # test "the truth" do # assert true # end @@ -649,7 +649,7 @@ Poltergeist. First add the Poltergeist gem to your Gemfile. Then in your require "test_helper" require "capybara/poltergeist" -class ActionSystemTestCase < ActionSystemTest::Base +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :poltergeist end ``` @@ -661,7 +661,7 @@ argument, all other arguments are optional. ```ruby require "test_helper" -class ActionSystemTestCase < ActionSystemTest::Base +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase driven_by :selenium, using: :firefox, on: 3000 end ``` @@ -717,7 +717,7 @@ Now let's open that file and write our first assertion: ```ruby require "system_test_helper" -class UsersTest < ActionSystemTestCase +class UsersTest < ApplicationSystemTestCase test "viewing the index" do visit articles_path assert_text "h1", "Articles" -- cgit v1.2.3