| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
Small change to improve the readability in section 2.3 of the testing
guide.
|
| |
| |
| |
| | |
That option was removed in 0a683085b1db435b7371350b2799a0f248cd717a
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Since test suffix is automatically granted, it is not necessary to
specify it in generator.
Also, updated the generated file to contents actually generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
As the specified command is `rails g system_test articles`, the generated class name
is `ArticlesTest`, not `UsersTest`
|
| |
|
| |
|
|
|
|
|
| |
There were some grammar issues and incorrect information in the system
tests documentation.
|
|
|
|
|
|
| |
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 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 the documentation after rewriting a majority of the functionality
for system testing.
|
|
|
|
|
| |
This adds the required guides for how to write and use system tests in
your application.
|
|
|
|
|
| |
`assert_send` was deprecated in minitest 5.10.0.
Ref: https://github.com/seattlerb/minitest/commit/f95ef007ec64d956d88fedc37fd2ed7e106b777e
|
|
|
|
| |
auth [ci skip]
|
| |
|
|
|
|
|
| |
`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
|
|
|
|
|
|
|
|
| |
Fixes #26602
Relevant method documentation:
https://github.com/rails/rails/blob/abe3da9f12710ea85be69b17172bef41220037fc/actionpack/lib/action_dispatch/testing/integration.rb#L14-L43
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Specified directories for routes, views and jobs tests
|
| |
| |
| |
| |
| | |
* 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.)
|
| |
| |
| |
| | |
Also modify to use Ruby 1.9+ syntax.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
instance variables are set.[ci skip]
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
| |
controller tests [ci skip]
- Fixes #25394.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- inbuilt --> built-in
- Remove random spaces from code examples
[ci skip]
|
|
|
|
|
|
|
|
|
| |
- Various grammar fixes
- Added assertions for update controller action tests
- Added user helper tests
- Fix typos
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
| |
- Grammar fixes
- Wordsmitting
- Fixed wrong statement about association usage in fixtures
- Changed association name from 'one' to 'first' instead
- More consistent usage of we/our
- Mentions assert_select is below, not already covered in Integration test.
[ci skip]
|
|
|
|
|
|
|
|
|
| |
- Grammar improvements
- Consistent usage of you or we in sentences
- Tests can have zero or more assertions. Its not mandatory to have one.
- Example for assert_send
[ci skip]
|
|
|
| |
I go through the `http://edgeguides.rubyonrails.org/` and found `rake` commands in various files that are in RAILS 5.0 implement by `bin/rails` command. I try to change all that can be directly use `bin/rails …`
|
| |
|
|
|
|
|
|
|
| |
This is a pass over the documentation which fills the missing gaps of
`ApplicationRecord`.
[ci skip]
|
|
|
| |
Tiny typo in the testing guide; articules should be articles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Rails 5.1 `ActionController::TestCase` will be moved out of Rails
into it's own gem.
Please use `ActionDispatch::IntegrationTest` going foward.
Because this will be moved to a gem I used `# :stopdoc:` instead of
deleting the documentation. This will remove it from the Rails
documentation but still leave the method documented for when we move it
to a gem.
Guides have been updated to use the routing structure used in Integration
and all test examples have been updated to inherit from
`ActionDispatch::IntegrationTest` instead of `ActionController::TestCase.
Fixes #22496
|
|
|
|
|
|
|
|
|
|
|
| |
[ci skip]
Since the "Getting Started" guide no longer uses the scaffold generator
we should rewrite references to that in the testing guide.
The functional testing section was quite heavily based on such a
scaffold test. I changed it to use `generate scaffold_controller`
instead so that we can build up on the model foundation we already have.
|