diff options
author | eileencodes <eileencodes@gmail.com> | 2017-02-19 11:50:42 -0500 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2017-02-20 15:07:35 -0500 |
commit | 1a0ca84a064b07ecab798793a3d7ebe89bb6367c (patch) | |
tree | b4eccc275e62040d0a3ffdcc19103e54ab0289b6 /guides | |
parent | 0a683085b1db435b7371350b2799a0f248cd717a (diff) | |
download | rails-1a0ca84a064b07ecab798793a3d7ebe89bb6367c.tar.gz rails-1a0ca84a064b07ecab798793a3d7ebe89bb6367c.tar.bz2 rails-1a0ca84a064b07ecab798793a3d7ebe89bb6367c.zip |
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
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/testing.md | 10 |
1 files changed, 5 insertions, 5 deletions
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" |