aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/testing.md
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #29101 from ccarruitero/system_guideEileen M. Uchitelle2017-06-021-10/+8
|\ | | | | some typos and rephrasing in system test guide [ci skip]
| * some typos and rephrasing in system test guide [ci skip]Cesar Carruitero2017-05-161-10/+8
| |
* | SystemTesting::Driver can register capybara-webkit and poltergeistMario Alberto Chávez2017-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | drivers. When using `driver_by` with capybara-webkit or poltergeist, SystemTesting::Driver will register the driver while passing `screen_size` and `options` parameteres. `options` could contain any option supported by the underlying driver.
* | Remove extra block for `assert_changes` [ci skip]Ryuta Kamizono2017-05-301-1/+1
| |
* | List assert_{,no_}changes in the testing guideGenadi Samokovarov2017-05-291-0/+2
|/ | | | | This lists the `assert_changes` and `assert_no_changes` methods in the guides. [ci skip]
* Clarify documentation for system test argumentseileencodes2017-05-141-2/+2
| | | | | | | | Previously this implied that system tests provided other non-headless drivers when Selenium is the only driver that uses `:using`, `:screen_size` or `:options` arguments. This change clarifies that Selenium is the only non-headless driver.
* Use a more realistic use-case for system test generatoreileencodes2017-05-141-5/+5
| | | | | | | | It's more likely you'll generate a test for testing users than a users creates test. This is a better example of a real world test. Additionally the users create view is unlikely to have the text "UserCreates" since that is likely generated as well. This is now an example of visiting the users index.
* [ci skip] Mailer fixtures in Testing guide.Cody Boyko2017-05-121-1/+1
| | | | | Update guide to clarify that mailer fixtures are not created when using the mailer generator.
* Fix link to `assert_nothing_raised` doc [ci skip]yuuji.yaginuma2017-05-081-1/+1
| | | | The `assert_nothing_raised` was moved to `ActiveSupport::Testing::Assertions` in 3cece0b6574c496605df055a2ebf77177f5b6e7f.
* Should escape meta characters in regexpRyuta Kamizono2017-05-071-1/+1
|
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2017-03-251-3/+3
|\
| * Edits to Systems testing section [ci skip]Vipul A M2017-03-091-3/+3
| |
* | Improve readability of testing guide [ci skip]James Baer2017-03-101-1/+1
| | | | | | | | | | Small change to improve the readability in section 2.3 of the testing guide.
* | Remove `:on` option that does ot exist [ci skip]yuuji.yaginuma2017-03-071-2/+2
| | | | | | | | That option was removed in 0a683085b1db435b7371350b2799a0f248cd717a
* | Avoid running system tests by defaultRobin Dupret2017-03-051-0/+3
|/ | | | | | | | | | These tests may be expansive so let's only allow users to run them through `bin/rails test:system` or by passing a path to the `test` command. The same applies for `bin/rake test`. Refs #28109.
* Fx system test example [ci skip]yuuji.yaginuma2017-03-041-7/+9
| | | | | | Since test suffix is automatically granted, it is not necessary to specify it in generator. Also, updated the generated file to contents actually generated.
* Improve documentation for Testing Your Mailers [ci skip]James Baer2017-02-281-0/+4
| | | | | | | | | | | | | | The current Basic Test Case example has the following assertion ``` assert_equal read_fixture('invite').join, email.body.to_s ``` email.body.to_s returns an empty string if both HTML and text templates exist for a given mailer. This commit adds a note to section 11.2.2 explaining this and also suggests using email.text_part.body.to_s and email.html_part.body.to_s as alternatives.
* remove needless extension from system test example [ci skip]yuuji.yaginuma2017-02-221-1/+1
|
* [doc] Fix wrong class name in testing.mdCelso Fernandes2017-02-211-1/+1
| | | | As the specified command is `rails g system_test articles`, the generated class name is `ArticlesTest`, not `UsersTest`
* Tiny documentation edits [ci skip]Robin Dupret2017-02-211-16/+11
|
* Fix some grammar in docs [ci skip]kenta-s2017-02-211-3/+3
|
* Clean up documentationeileencodes2017-02-201-7/+7
| | | | | There were some grammar issues and incorrect information in the system tests documentation.
* Rename system_test_helper -> application_system_test_caseeileencodes2017-02-201-12/+12
| | | | | | This renames the system test helper file to be application system test case to match what the rest of Rails does. In the future we should consider changing the test_helper to match.
* Move and rename system testseileencodes2017-02-201-5/+5
| | | | | | | | | | * 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
* Update documentation and guideseileencodes2017-02-201-98/+36
| | | | | Update the documentation after rewriting a majority of the functionality for system testing.
* Add guides for system testingeileencodes2017-02-201-3/+251
| | | | | This adds the required guides for how to write and use system tests in your application.
* remove deprecated `assert_send` from assertion list [ci skip]yuuji.yaginuma2016-12-091-1/+0
| | | | | `assert_send` was deprecated in minitest 5.10.0. Ref: https://github.com/seattlerb/minitest/commit/f95ef007ec64d956d88fedc37fd2ed7e106b777e
* Add note about step needed to get tests to pass if you implemented basic ↵JessRudder2016-11-281-0/+7
| | | | auth [ci skip]
* fix typo in Rails Test Runner sectioncolleenmcguckin2016-10-311-2/+2
|
* update description of queue adapter in test [ci skip]yuuji.yaginuma2016-09-281-2/+2
| | | | | `ActiveJob::TestCase` set `TestAdapter` to queue adapter at `before_setup`. https://github.com/rails/rails/blob/master/activejob/lib/active_job/test_helper.rb#L12..L21
* Fix docs for allowed params to `get` in controller tests [ci skip]Michael Hoy2016-09-231-4/+4
| | | | | | | | Fixes #26602 Relevant method documentation: https://github.com/rails/rails/blob/abe3da9f12710ea85be69b17172bef41220037fc/actionpack/lib/action_dispatch/testing/integration.rb#L14-L43
* Update typo & Make explanation more clearShia2016-08-311-12/+7
|
* Move `assert_nothing_raised` method to Rails Specific AssertionsSantosh Wadghule2016-08-261-1/+1
| | | | | | | | section [ci skip] - Method `assert_nothing_raised` is Rails' own custom assertion method and not a part of Minitest. So move it from Minitest assertions section to Rails Specific Assertions section.
* Merge pull request #25750 from go2null/go2null-test-directoriesEileen M. Uchitelle2016-08-221-2/+4
|\ | | | | Specified directories for routes, views and jobs tests
| * Clearly state purpose of test directoriesgo2null2016-08-221-2/+4
| | | | | | | | | | * Added location for route, view and job tests to section 2.1. (They are currently only defined in sections 8 Testing Views and 11 Testing Jobs.) * Added location for route test in section 7 Testing Routes. (Currently only defined in section 8 Testing Views.)
* | add missing braces [ci skip]yuuji.yaginuma2016-07-161-2/+2
| | | | | | | | Also modify to use Ruby 1.9+ syntax.
* | Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-07-101-1/+14
|\ \ | |/ |/|
| * Expand on Instance variables section with an example and specify when the ↵Vipul A M2016-07-021-1/+14
| | | | | | | | instance variables are set.[ci skip]
* | Update testing guide for Rails 5 release [ci skip]Prathamesh Sonpatki2016-06-301-42/+102
|/ | | | | | | | | | | | | | | | | - Update the testing guide as per output of test runner. - Show how to see all the options provided by test runner. - We no longer generate fixture named :first. - Update the request methods with URL helpers and also fix few wrong occurrences. - Generated test case does not have assert_includes for response body. - This removes code from https://github.com/rails/rails/commit/ca83436d but I think that might be oversight. We don't generate such code in the generated controller test. - Update the helper example to suite the integration style of tests. - We can't modify session directly in new integration style controller tests. - Show an example which matches with integration style request tests. - Active Job default adapter for tests is async, not test. - Fix the example of request headers and CGI variables.
* update_url is not `get` most of the times [ci skip]Prathamesh Sonpatki2016-06-221-1/+1
|
* Fix the docs for supported keyword args for Rails 5 style integration ↵Prathamesh Sonpatki2016-06-211-7/+11
| | | | | | controller tests [ci skip] - Fixes #25394.
* fix module name [ci skip]yuuji.yaginuma2016-05-201-1/+1
|
* Clarify fixtures examples [ci skip]Stefan Wrobel2016-04-081-1/+2
|
* Change 'a HTTP' to 'an HTTP' [ci skip]Santosh Wadghule2016-03-031-1/+1
|
* update assert_nothing_raised in testing.mdTara Scherner de la Fuente2016-02-221-1/+1
|
* reset `ActionMailer::Base.deliveries` in `ActionDispatch::IntegrationTest`.Yves Senn2016-02-161-3/+3
| | | | | | | | | Whenever you are sending emails in integration tests using the `:test` delivery method you need to make sure that `ActionMailer::Base.deliveries` is reset after every test. This piece of boilerplate code is present in all my applications that send emails. Let's have `ActionDispatch::IntegrationTest` reset the deliveries automatically.
* add missing name option to flash test example [ci skip]yuuji.yaginuma2016-02-131-2/+2
|
* Check off some todos for the Testing guide with @senny [ci skip]Zachary Scott2016-02-051-17/+26
|
* docs, remove trailing whitespace from testing guide. [ci skip]Yves Senn2016-02-051-9/+9
|
* docs, link Rails specific assertions to the API. [ci skip]Yves Senn2016-02-051-6/+6
|