Staphany Park
3862c55049
Add fixture use case to testing.md.
...
I think people would find it useful to know that you can pass in multiple fixture names to get an array of all the fixtures. I've found this useful in my own app. It looks like there already a test case that supports this feature (https://github.com/rails/rails/blob/master/activerecord/test/cases/fixtures_test.rb#L398 ), but it's just not documented here.
I look forward to your feedback!
2015-06-13 01:11:25 -04:00
Guo Xiang Tan
ca83436d1b
Remove assigns
and assert_template
.
2015-05-30 14:13:57 +08:00
Hiromichi Yamada
a227e88017
[ci skip] Fix block parameter of assert_no_difference
2015-05-28 21:20:01 +09:00
Eliot Sykes
b539760014
Make link to configuring guide relative [ci skip]
2015-05-22 07:55:54 +01:00
Arun Agrawal
879f316995
Fix broken link for minitest. [ci skip]
...
For more details see #20222
2015-05-20 14:55:58 +02:00
Gaurav Sharma
3e238b6b0f
[ci skip] update ruby doc links; for rails next version ruby 2.2+ will be supported only
2015-05-20 17:41:17 +05:30
Benjamin Klotz
d5847f4cc0
Clarify view tests [ci skip]
...
Mention that view tests are made in controller tests.
2015-05-14 18:05:21 +02:00
yui-knk
5f3bd44710
[ci skip] Fix purpose of assert_kind_of
2015-05-10 21:40:31 +09:00
Yves Senn
a66a64aa2a
guides, bring back minitest assertion table. [ci skip]
...
Rails has different naming conventions for the inverse assertion
methods. While minitest uses `refute` we use `_not`. We should have a
table listing the common assertions that you want to use in the Rails
context.
Refs #18305 .
2015-04-28 12:16:19 +02:00
Kir Shatrov
afbd6559f9
No need to mention unit tests in testing guide anymore
2015-03-31 14:38:28 +03:00
Kir Shatrov
851621bf19
New test runner syntax in testing guide
2015-03-31 14:38:28 +03:00
Kir Shatrov
487aa51b14
Suggest new hash syntax in testing guide
2015-03-31 14:38:28 +03:00
Kir Shatrov
3cee8ce2e8
Don't suggest bin/rails test controllers
2015-03-31 13:45:17 +03:00
Hendy Tanata
b016533d5b
Add missing "of" to testing guide.
2015-03-30 09:15:54 -07:00
Matthew Draper
ffd2f085a5
Merge branch 'kirs'
2015-03-30 17:06:09 +10:30
Kir Shatrov
09d2623783
Switch to bin/rails test
in testing guide
...
rails/rails#18305
2015-03-30 00:11:02 +03:00
Vijay Dev
c26ee64b92
Merge branch 'master' of github.com:rails/docrails
...
Conflicts:
guides/source/4_0_release_notes.md
2015-03-26 16:22:41 +00:00
Kyle Oba
138180252d
[skip ci] Minor edits for clarity, to make smooth, & separate clauses.
...
* Add conjunction for clarity.
* Add comma between independent clauses: create command, and generation
of fixtures.
2015-03-25 16:04:57 -10:00
yui-knk
39dfbf0b9c
[ci skip] Capitalize title
2015-03-22 22:54:14 +09:00
Kir Shatrov
0d16c9d1a5
Better title in Testing Guide
...
suggested by @senny
https://github.com/rails/rails/pull/18305#issuecomment-73847595
2015-03-22 12:52:17 +02:00
Sean Collins
43fc9892ac
Change 'girlfriend' to 'partner'
2015-03-20 15:24:54 -04:00
Rafael Mendonça França
675f299c8e
Merge pull request #19322 from AndrewHendrie/AndrewHendrie-guides-testing-partials-patch
...
Asserting partials modification
2015-03-13 14:57:30 -03:00
Andrew Hendrie
3830854510
Asserting partials modification
...
Changed "create Articles view" to "new article view". The create action doesn't typically have a view assigned to it. The view that's being referred to is the 'new' Article view.
2015-03-13 11:28:18 -04:00
Marius Butuc
c921606d26
Fix typo in the “Testing Your Mailers” docs
...
* [ci skip]
2015-03-12 15:36:53 -04:00
Andrew Hendrie
3f0b7b41e1
Changed 'blank space' to 'blank line'
...
Line 85 stated that fixtures are typically separated by a blank space. I changed the wording to blank line because blank space could be misinterpreted as a non-breaking space character when in reality, each fixture record (in YAML) is separated by a blank line.
2015-03-09 20:20:06 -04:00
yuuji.yaginuma
4b0f0bc37e
add ActiveJob::TestCase
to list of classes providing for test [ci skip]
2015-02-28 23:31:11 +09:00
Robin Dupret
1747c4e2ce
Tiny documentation edits [ci skip]
2015-02-15 19:19:04 +01:00
Yves Senn
714e6fc445
guides, various testing guide changes. [ci skip]
...
/cc @zzak
2015-02-11 09:27:14 +01:00
Kir Shatrov
b19999f3a7
Migrating xhr methods to keyword arguments syntax
...
in `ActionController::TestCase` and
`ActionDispatch::Integration`
Old syntax:
`xhr :get, :create, params: { id: 1 }`
New syntax example:
`get :create, params: { id: 1 }, xhr: true`
2015-02-01 16:07:42 +03:00
Rafael Mendonça França
bb6fe7e73a
Consistent usage of spaces in hashes across our codebase
2015-01-29 12:19:41 -02:00
Rafael Mendonça França
7814f901e1
Use fixed fonts only in the name of the parameter
2015-01-29 12:19:21 -02:00
Kir Shatrov
baf14ae513
Switch to kwargs in ActionController::TestCase and ActionDispatch::Integration
...
Non-kwargs requests are deprecated now.
Guides are updated as well.
`post url, nil, nil, { a: 'b' }` doesn't make sense.
`post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
2015-01-29 14:44:46 +02:00
Rafael Mendonça França
01c1667b97
Fix test case class in the testing guide [ci skip]
2015-01-21 13:12:24 -02:00
Vijay Dev
3f96b6973b
Merge branch 'master' of github.com:rails/docrails
2015-01-15 07:28:21 +00:00
Vipul A M
5cfaf5a46e
- Changed IN
to ON
in markdown renderer condition
...
- Changed `IN` to `ON` in all note sentences in guides.
2015-01-14 11:52:13 +05:30
Kir Shatrov
ef7274be87
Better example of teardown
method in test guide
...
rails/rails#18305 , thanks for @dhh suggestion
2015-01-03 23:45:50 +01:00
Kir Shatrov
cf87cfeb57
Demonstrate example of assert_emails
in testing guide
...
rails/rails#18305 , thanks for @dhh suggestion
2015-01-03 23:25:09 +01:00
Kir Shatrov
4a3b9c8283
Docs for controller test helpers
...
rails/rails#18305
2015-01-03 20:18:56 +01:00
Kir Shatrov
bb3c054358
Avoid double negation in test guide
...
rails/rails#18305
2015-01-03 20:16:06 +01:00
Kir Shatrov
1ffd1a305c
Section about testing xhr requests
...
rails/rails#18305
2015-01-03 20:16:06 +01:00
yuuji.yaginuma
54368bb339
fix rake command typo in Testing guide [ci skip]
2014-12-31 22:36:22 +09:00
Zachary Scott
5c35f704d1
Replace exhaustive list of methods with pointer to API docs. [ci skip]
2014-12-30 11:07:38 -08:00
Zachary Scott
eeccdacbba
Add result of running articles_routes_test and point to more information for
...
RoutingAssertions. [ci skip]
2014-12-30 11:03:13 -08:00
Zachary Scott
12c6de9aae
Move request tests after functional and before views, and move helper tests
...
after views. [ci skip]
2014-12-30 10:56:12 -08:00
Zachary Scott
eb9eb42c2b
Make "Testing Views" separate section, move "Setup and Teardown" into
...
functional testing section and implement :show, :destroy, and :update tests.
[ci skip]
2014-12-30 10:42:20 -08:00
Zachary Scott
0874bff480
Add implement integration test to Testing Guide. [ci skip]
2014-12-30 10:15:54 -08:00
Zachary Scott
2326e0ee9f
Replace exhaustive list of helper methods with pointers to helper classes found
...
in the Action Dispatch Integration module. [ci skip]
2014-12-30 09:37:20 -08:00
Zachary Scott
9c9e7226c8
Remove this line which was added by accident [ci skip]
2014-12-30 09:27:44 -08:00
Zachary Scott
d9b080bf3b
Move Rake tasks list to a smaller heading section earlier in the guide.
...
It makes more sense here, rather than after explaining all of the testing
facilities of Rails. [ci skip]
2014-12-29 18:13:47 -08:00
Zachary Scott
7e00ca987c
Condense notes regarding Minitest and its available assertions removed in:
...
82b75eda70f8c30f7c418e7350532a3a0ed2a8c3
Also explain how Rails inherits capabilities from Minitest. Test classes should
be roughly the same based on this information, we can address them at a high
level when introducing the first test case. [ci skip]
2014-12-29 18:07:48 -08:00
Zachary Scott
82b75eda70
Remove redundant information about Minitest, which is already covered when
...
assertions are introduced. [ci skip]
2014-12-29 17:57:47 -08:00
Zachary Scott
241ccaef88
Move longer form example from integration guide to api reference, below an
...
existing example. [ci skip]
My reasoning is that this is probably too much information for the complete
Rails testing guide, as we're trying to cover testing all aspects of the
framework.
2014-12-29 17:29:47 -08:00
Zachary Scott
152ac966ae
Grammar pass through Integration Testing section [ci skip]
2014-12-29 17:29:47 -08:00
Zachary Scott
b80a6cd0d3
Remove pre-4.2 comment about missing assert_select
[ci skip]
2014-12-29 15:51:35 -08:00
Zachary Scott
b9292cbd49
Update link to rails-dom-testing documentation [ci skip]
2014-12-29 15:51:22 -08:00
Zachary Scott
783a6af959
Pass through assert_select
testing guide [ci skip]
2014-12-29 15:50:23 -08:00
Zachary Scott
bf70dea0d6
Implement testing flash
notices into our blog app [ci skip]
2014-12-29 15:29:21 -08:00
Zachary Scott
abc516dca3
Pass through Testing Templates and Layouts section [ci skip]
2014-12-29 15:15:57 -08:00
Zachary Scott
df9ceb868c
These are technically objects [ci skip]
2014-12-29 15:01:41 -08:00
Zachary Scott
97cac32841
Rephrase Four Hashes of the Apocalypse [ci skip]
2014-12-29 15:01:23 -08:00
Zachary Scott
8beb781d0e
Compare http request type with test equivalent methods, and application use-cases.
...
Briefly explain difference between Functional and Request type tests. [ci skip]
2014-12-29 14:25:55 -08:00
Zachary Scott
1a7ab647de
Rephrase functional testing in its relation to Rails Controller Unit Testing.
...
[ci skip]
2014-12-29 13:05:14 -08:00
Zachary Scott
b273c04f15
Add example to get Errored test to pass in Testing guide [ci skip]
2014-12-25 12:21:35 -05:00
Xavier Noria
7702974281
warn about reading guides in GitHub
...
References #18148 .
2014-12-23 23:32:50 +01:00
Zachary Scott
3cc9359c2d
Remove this section, it adds no real value [ci skip]
2014-12-22 11:11:12 -05:00
Zachary Scott
cd01f9f9c5
Add subheadings for these sections [ci skip]
2014-12-22 10:12:06 -05:00
Zachary Scott
eb93e70263
I'm sorry but I would rather not link to a 7 year old blog post [ci skip]
2014-12-22 10:07:15 -05:00
Zachary Scott
2526b95f20
Remove this line since we are using Rake to run our tests [ci skip]
2014-12-22 10:03:03 -05:00
Zachary Scott
a6d9049dc0
s/are edited and rerun/required modifications [ci skip]
2014-12-22 09:50:20 -05:00
Yves Senn
3b34cf3042
document the return of db:test:prepare
. Closes #18136 . [ci skip]
...
This is a doc follow-up to #17739 .
/cc @zzak
2014-12-22 15:37:59 +01:00
Zachary Scott
334f620858
Better explain number of assertions per test [ci skip]
2014-12-22 03:29:34 -08:00
Zachary Scott
0cf3f9adf5
Remove duplicate description of the previous line [ci skip]
2014-12-22 03:29:16 -08:00
Zachary Scott
f2852298a1
Fix NOTE for method naming in Ruby and add intro sentence to next section.
...
[ci skip]
2014-12-22 03:25:40 -08:00
Zachary Scott
e36d79fbde
Removed run-on sentence and replace with sectional comments [ci skip]
2014-12-22 03:25:18 -08:00
Zachary Scott
0145cc6e50
Better explain how test() methods get defined and kill this run-on sentence.
...
[ci skip]
2014-12-22 03:24:22 -08:00
Zachary Scott
2d224a6b67
We may only look at some of the methods available from TestCase [ci skip]
2014-12-22 03:23:23 -08:00
Zachary Scott
d6fc5af1df
Better explain what test_helper.rb
is designed for [ci skip]
2014-12-22 03:17:13 -08:00
Jon Atack
2f1cf8101f
Testing guide grammar fix
...
[skip ci]
2014-12-21 16:06:46 +01:00
Zachary Scott
651bba1bfe
We will be using the application already created in the Getting Started guide.
...
[ci skip]
2014-12-20 19:02:47 -08:00
Jon Atack
74ddf0051f
Follow-up to d9710212 [skip ci]
2014-12-21 00:36:01 +01:00
Zachary Scott
4ad9d68581
Fixture data is accessible by a local method, and not a variable [ci skip]
2014-12-20 15:30:55 -08:00
Zachary Scott
72752643bb
Shorten the explaination of this to fit on one line [ci skip]
2014-12-20 15:26:17 -08:00
Zachary Scott
7514b6ab18
s/folder/directory [ci skip]
2014-12-20 15:26:00 -08:00
Zachary Scott
9ea0e37f72
"In PostgreSQL, just superusers.." => "In PostgreSQL, only superusers.."
...
[ci skip]
2014-12-20 15:13:12 -08:00
Zachary Scott
bc24f19686
Make sure this section is rendered as a NOTE
and remove redundant sentence.
...
[ci skip]
2014-12-20 15:10:28 -08:00
Zachary Scott
356e95c009
Add note about the association between the two fixture files and how they're connection.
...
[ci skip]
2014-12-20 15:07:11 -08:00
Zachary Scott
6925c14689
Remove YAML implementation detail, as we're not trying to document all of
...
YAML's behavior in this guide. [ci skip]
2014-12-20 15:03:32 -08:00
Zachary Scott
c709edaceb
Remove use of "very" [ci skip]
2014-12-20 14:57:40 -08:00
Zachary Scott
d9710212c2
Describe the mailer and helpers directories which are generated by rails new
.
...
[ci skip]
2014-12-20 14:42:52 -08:00
Zachary Scott
32626dec3f
Update comment regarding test environment with help from @matthewd [ci skip]
2014-12-20 11:05:36 -08:00
andrey.nering@gmail.com
6d59473b48
Adding a tip in the guides about possible database permission problems on
...
loading fixtures to the database.
Reference #17542
2014-12-09 13:36:10 -02:00
Prathamesh Sonpatki
98e41032fd
[Testing guide] Using "Fixtures API" consistently
...
- In guides, "API" is used consistently instead of "api".
- Reason behind replacing "fixtures API" to "Fixtures API" is because
here we are referring to the concept of "fixtures". In other places in
the guide "fixture" OR "fixtures" is referred to the single or
multiple instances of test data.
- This is also followup of aa9d1332b2 (commitcomment-8497376)
.
2014-11-30 10:26:13 +00:00
Prathamesh Sonpatki
9710d73260
[Testing guide] Use "Fixtures API" instead of "fixture api".
2014-11-30 10:26:13 +00:00
Jon Atack
d987bdd7fa
Simplify and fix grammar
...
[skip ci]
2014-11-14 21:22:10 +01:00
Guo Xiang Tan
f88a4d3900
[CI SKIP] Corrections to testing guide.
...
Partially revert c31e638a37
.
2014-11-14 16:52:51 +08:00
Sandip Ransing
5e3c5cef85
[ci skip] Remove deprecated testing tasks
...
This has changed recently and so rake test:all and rake
test:all:db are deprecated.
2014-11-14 11:51:06 +05:30
Sandip Ransing
c31e638a37
[ci skip] Improve upon testing tasks guide
...
Add missing testing tasks and also improve upon tasks descriptions
2014-11-14 02:52:58 +05:30
Sandip Ransing
d9d84cea53
[ci skip] Capybara added to other testing approaches
2014-11-14 02:07:22 +05:30
Sandip Ransing
062988efd3
[ci skip] Add one more example to routing testing, and highlight association
...
name keywords
2014-11-13 11:50:56 -08:00
David Heinemeier Hansson
2a31ea5545
Merge pull request #17348 from DavidGeukers/rake_test_all
...
simplify rake test vs rake test:all
2014-11-12 13:42:17 +03:00
David Geukers
3b12abba3c
Simplify rake test vs rake test:all
...
Renames `rake test:all` to `rake test` by changing old `rake test:run` to previous version of `rake test:all`. Removes old definition of `rake test`. Also renames `rake test:all:db` to `rake test:db` and deprecates `rake test:all` & `rake test:all:db`
2014-11-10 20:33:31 -05:00
Robin Dupret
f8f02f4f6d
Merge pull request #17476 from robin850/job-testing
...
Add a section about job testing [ci skip]
2014-11-08 12:36:58 +01:00
Jimmy Petersen
5bdaf31628
Guides: Corrected name for assigns key [ci skip]
...
- Integration test example is now using 'articles' name
for both path and assigns key.
2014-11-07 11:30:52 +01:00
Ryan Selk
98626e27c1
Add a section about job testing [ci skip]
...
* Cover lower level job testing (assertions about the execution of the
job itself).
* Add a table with the custom assertions provided by Active Job's
`TestHelper` module.
* Add an example testing job queuing inside a model
2014-11-02 12:59:58 +01:00
Rafael Mendonça França
487145f871
Merge pull request #17040 from clyfe/patch-1
...
Explicit route test class
2014-10-31 18:57:56 -02:00
yuuji.yaginuma
25895427c3
[ci skip] add test:jobs
task to testing guide
2014-10-03 08:50:28 +09:00
Claudius Nicolae
b36f123d09
Explicit route test class
...
shows the class that the test must extend in order to have the assert_routing method available
2014-09-24 01:15:27 +03:00
Bradly Feeley
d4f0f836f5
[ci skip] Fixing spelling typo in testing guide.
2014-08-20 16:21:56 -07:00
Cristian Bica
9e7f4a94ca
Updated rdoc / guides / release notes related to ActiveJob / ActionMailer
2014-08-20 17:48:34 +03:00
Rafael Mendonça França
a2400308ea
Merge branch 'master' into loofah
...
Conflicts:
actionpack/CHANGELOG.md
actionpack/test/controller/integration_test.rb
actionview/CHANGELOG.md
2014-08-12 11:10:42 -03:00
David Heinemeier Hansson
206347fd3e
Update docs to reflect that helper stubs are no longer generated
2014-08-03 15:12:05 -07:00
yuuji.yaginuma
c9469c0d01
[ci skip] Remove "Machinist" from testing guide
2014-08-03 10:37:31 +09:00
Vijay Dev
3bf2a4c0d2
Merge branch 'master' of github.com:rails/docrails
...
Conflicts:
guides/source/testing.md
2014-08-02 12:09:07 +00:00
Jonas Baumann
e96e840ede
link minitest assertions documentation.
2014-07-16 12:34:03 +02:00
Jonas Baumann
cbc0c18461
document assert[_not]_empty, assert[_not]_includes, assert[_not]_predicate in testing guide.
2014-07-16 12:30:46 +02:00
Gaurish Sharma
04e1281990
Add link to minitest rdoc & github
2014-07-13 02:28:25 +05:30
Rafael Mendonça França
3229eda00c
Merge pull request #11218 from kaspth/loofah-integration
...
Loofah-integration
Conflicts:
actionpack/CHANGELOG.md
actionview/CHANGELOG.md
2014-07-10 16:52:00 -03:00
Nishant Modak
da5ac71885
correct markdown usage [ci skip]
2014-07-09 01:32:44 +05:30
Nick Pellant
a3a73d1a11
Fix 10.3 invite_email.body assert_match example.
...
Currently there is no implicit conversion for Mail::Body to string
therefore .to_s must be applied. This is exampled in 10.2.2.
2014-06-30 16:46:31 +01:00
Robin Dupret
11ac0cad08
Follow-up to #15215 [ci skip]
2014-06-27 16:52:04 +02:00
Timm
9eada2daf8
Readded some documentation about substitution values.
2014-06-16 21:03:55 +02:00
Timm
1bc34386cf
Updated testing guide to reflect changes in ActionDispatch::SelectorAssertions.
2014-06-15 23:41:08 +02:00
schneems
071373857d
[ci skip] explain association behavior.
...
When you manually specify `id:` attribute in a fixture Rails' built in association assignment feature will no longer work. http://stackoverflow.com/questions/23985675/incorrect-association-in-fixtures
This commit raises awareness of this behavior and encourages developers to look directly at the fixture documentation.
2014-06-02 10:43:01 -05:00
schneems
a93f385c2b
[ci skip] add fixture docs link to guides
...
The fixtures API docs are really comprehensive. We should either be driving people there, or perhaps making fixtures its own guide.
2014-06-02 10:38:03 -05:00
Leandro Facchinetti
dcc532d2fb
Update Minitest references in Testing Guide
...
The Guide references `test/unit`, which has been replaced by `Minitest` in
all versions of Ruby supported by Rails. The following updates were
performed:
* The superclass of `ActiveSupport::TestCase` is no longer
`MiniTest::Unit::TestCase`, but `Minitest::Test` [1].
* The preferred spelling is `Minitest`, not `MiniTest` [2].
* For a method to be a test in Minitest, its name must start with `test_`,
not only `test` [3].
* Explanations about `test/unit` in Ruby 1.8 were removed in favor of more
up-to-date information on `Minitest`.
[1]: 6c2b569660/activesupport/lib/active_support/test_case.rb (L18)
[2]: d5d43cef9a/lib/minitest.rb (L9)
[3]: d5d43cef9a/lib/minitest/test.rb (L62)
2014-05-30 09:37:41 -03:00
Xavier Noria
36e3ca6cc5
integration tests do not need to load fixtures by hand
...
I don't know when this changed, checked back up to 3.2 and integration
tests instantiate fixtures just fine.
2014-05-25 00:45:20 +02:00
John Kelly Ferguson
d02c810e29
Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip]
2014-05-21 23:01:45 -04:00
Josef Šimánek
981dda53db
Use generated binstubs in guides examples.
...
[ci skip]
2014-05-20 13:29:18 +02:00
Hendy Tanata
f52a13cdf4
Replace first person point of view on guides.
...
[skip ci]
2014-05-16 17:15:00 -07:00
Gaurish Sharma
5d5b7c56ac
Instead boat load of libraries, simply say StdLib
2014-04-09 04:34:33 +05:30
Greg Molnar
fa8d35b4eb
change 'assert !' to 'assert_not' in guides [ci skip]
2014-02-20 14:04:53 +01:00
Prathamesh Sonpatki
42b2e3276b
[Testing Guide] Explain usage of assert_redirected_to with named routes and Active Record objects [ci skip]
2014-02-12 15:49:51 +05:30
Yves Senn
3b868cc99d
docs, link to HTTP and CGI header definitions. [ci skip]
...
This was a reaction to: https://github.com/rails/rails/pull/9700#issuecomment-34550210
2014-02-10 15:51:51 +01:00
Prathamesh Sonpatki
8fffcfc674
[Testing Guide] Mention :unauthorized in assert_response explanation [ci skip]
2014-02-07 22:59:15 +05:30
Arun Agrawal
10867a77be
Removed unused commented code [ci skip]
...
As discussed in #13940 this can be removed
We can document this somewhere else in testing guides.
2014-02-05 11:14:24 +01:00
Greg Molnar
d3edf1ea82
add missing sharp [ci skip]
2014-02-04 13:54:22 +01:00
Calvin Tam
8f0460d746
Fixed minor typo [ci skip]
2014-02-03 21:09:29 +11:00
Jon Leighton
ff7ab3bc78
Automatically maintain test database schema
...
* Move check from generated helper to test_help.rb, so that all
applications can benefit
* Rather than just raising when the test schema has pending migrations,
try to load in the schema and only raise if there are pending
migrations afterwards
* Opt out of the check by setting
config.active_record.maintain_test_schema = false
* Deprecate db:test:* tasks. The test helper is now fully responsible
for maintaining the test schema, so we don't need rake tasks for this.
This is also a speed improvement since we're no longer reloading the
test database on every call to "rake test".
2014-01-02 13:49:00 +00:00
Yves Senn
aabfba7aa0
doc fix. Use sess.path
within open_session
. Closes #13490 . [ci skip]
2013-12-27 09:35:14 +01:00
Paul Nikitochkin
3ab9d01dd4
Add rake test:all
, rake test:all:db
to guide
...
[ci skip]
2013-11-30 13:38:37 +02:00
Jens Dahl Møllerhøj
18010385fd
Fixed minor typo
...
instead of 'rake test' as shortcut, use 'rake'.
Closes #12780 [ci skip]
2013-11-09 18:49:50 -02:00
Yves Senn
9c4261351c
document BACKTRACE
env var usage in testing guide. [ci skip]
2013-11-04 17:43:05 +01:00
Geoffrey Roguelon
54c1cdf4ce
Fix a typo in the code of Testing guide.
...
Replace the word «Accepts» by «Accept» in the example of custom request headers.
2013-10-03 10:26:19 +02:00
Yves Senn
76d36458ea
mention controller test base class in testing guide. [ci skip]
2013-09-20 09:50:07 +02:00
Paul Nikitochkin
2c8bc2cdcd
Use Ruby on Rails Coding Conventions for code examples in the guides
...
* Indent after private/protected
* Ruby >= 1.9 syntax for hashes
* Prefer method { do_stuff } instead of method{do_stuff} for single-line blocks.
[ci skip]
2013-09-06 21:42:29 +03:00
Xavier Noria
b77f25cb84
cleans the guides sources from fancy non-ASCII stuff
2013-08-23 17:59:11 +02:00
Xavier Noria
28189f2524
Merge pull request #11059 from robin850/improve-test-guide
...
Improve the testing guide [ci skip]
2013-08-16 09:26:06 -07:00
Yves Senn
41f50beb7e
document assert_not_XYZ
in place of refute_XYZ
.
2013-08-14 17:36:34 +02:00
Cesar Carruitero
a028b16db8
update test names in testing guide [ci-skip]
2013-07-02 06:34:02 -05:00
Robin Dupret
577a6378ba
Improve the testing guide [ci skip]
...
Improve the "Testing Rails Applications" guide adding a section for
testing helpers and a little note about associations with ActiveRecord
and YAML fixtures.
Also add a link to Fixture Builder ; yet another replacement for
fixtures such as Machinist or FactoryGirl.
2013-06-25 22:07:38 +02:00
Vijay Dev
7663149f72
copy edits [ci skip]
2013-06-14 00:58:11 +05:30
Sunny Ripert
2478b5e619
Remove references to deprecated test tasks
2013-05-28 14:38:02 +02:00
Sunny Ripert
53607be559
Remove double spaces in guides
2013-05-28 14:38:02 +02:00
Sunny Ripert
606c09b8db
Consistent use of one space only after punctuation
2013-05-28 14:38:02 +02:00
Sunny Ripert
666d028bb8
End-of-line whitespace hunt
2013-05-28 14:38:01 +02:00
Vijay Dev
8476932aac
copy edits [ci skip]
2013-05-01 16:10:08 +05:30
Florian Thomas
88b08f0786
fixes typo in testing guide
2013-04-21 16:31:29 -03:00
Florian Thomas
825d67687f
Updates list of assertions in testing guide
2013-04-21 16:28:39 -03:00
Jonathan Roes
8a70b2dbbb
There are now 6 request methods including PATCH
2013-04-19 23:49:40 -03:00
Jonathan Roes
385edec24d
Simplify ERB example code
2013-04-19 23:44:52 -03:00
Florian Thomas
615a2cb0f6
MiniTest::Unit is used instead of Test::Unit
2013-04-19 00:06:02 -03:00
Vijay Dev
b15ce4a006
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
guides/source/action_mailer_basics.md
2013-04-11 22:58:14 +05:30
Dan Erikson
f31fdce7a5
Improve some variable naming for the integration test in the testing guide. [ci skip]
2013-04-06 00:06:56 -06:00
Dan Erikson
018cc389d1
Corrected model test directory to be test/models instead of test/unit.
2013-04-06 00:01:48 -06:00
Aaron Patterson
ea3a190137
updating the guide
2013-04-05 17:13:58 -07:00
Aaron Patterson
32eff659bc
just use ruby to run tests
2013-04-05 15:46:41 -07:00
Aaron Patterson
c7a148f389
removing rails test
, updating docs to show how to use rake test
2013-04-05 15:44:41 -07:00
Vijay Dev
6d8c070821
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
activerecord/test/cases/adapter_test.rb
guides/source/testing.md
[ci skip]
2013-03-30 15:46:14 +05:30
Yves Senn
b662cb89ce
move mailer testing examples into the testing guide.
...
Closes #9325 .
I adjusted the example and the description in the testing guide and
simply linked from the mailer to the testing guide. This way we don't
have to maintain two separate places.
2013-03-25 19:46:44 +01:00
Deshi Xiao
5d5ade2b41
correct some typo in earlier commit.
2013-03-24 17:19:10 +08:00
Deshi Xiao
11c58831c3
correct test command's typo
2013-03-24 17:16:06 +08:00
Ken Collins
5be6122c39
Add minitest-spec-rails to guide's testing options
2013-03-22 10:27:41 -03:00
Yves Senn
41a14dcd10
Http::Headers
directly modifies the passed environment.
...
The env hash passed to `Http::Headers#new` must be in env format.
Also be aware that the passed hash is modified directly.
docs and test-cases for setting headers/env in functional tests.
Follow up to #9700 .
2013-03-15 10:13:49 +01:00
Dalibor Nasevic
df85dfa6fa
Improve wording for rails test command
2013-03-09 16:03:55 -05:00
Prem Sichanugrist
176b57c543
Add support for MiniTest flags in TestRunner
...
Any flags that got set will be passed through to MiniTest::Unit.runner,
such as `-n`, `-s-, and `-v`.
2013-03-09 16:03:55 -05:00
Prem Sichanugrist
9f75f7735a
Update testing documentation
...
* Update test invocation to use `rails test` instead.
* Update all the test command previews (since we're now using MiniTest.)
* Mentioning MiniTest instead of Test::Unit.
* Update list of test suites.
2013-03-09 16:03:55 -05:00
Vijay Dev
2008fe606b
copy edits [ci skip]
2013-02-15 22:01:11 +05:30
Americo Savinon
6530d42dbb
Detail Ruby 1.8 ships with TestUnit and Ruby 1.9 with MiniTest
2013-02-12 14:56:19 -05:00
Xavier Noria
0b5d3f3273
Merge remote-tracking branch 'docrails/master'
...
Conflicts:
actionpack/lib/action_view/helpers/form_options_helper.rb
guides/code/getting_started/app/controllers/comments_controller.rb
2013-01-26 17:41:56 +01:00
Jonathan Garvin
f58e268e38
clarify awkward sentence re: email testing
2013-01-16 19:19:31 -07:00
Yves Senn
ce8e3d3072
remove performance tests from the default stack
2013-01-10 17:09:06 +01:00
Joey Schoblaska
46af32aa50
fixed inconsistent require 'test_helper'
in testing guide
2012-12-30 16:47:19 -06:00
Nishant Modak
9a497582e6
Update documentation for yml usage
...
Update documentation for yml usage against https://github.com/rails/rails/issues/8612
2012-12-30 02:33:57 +05:30
Katie Oldaker
7c05ea23a0
Fixed grammar in a lot of guide prologues.
2012-12-07 12:50:09 -05:00
Steve Klabnik
d16a1b9e8b
Normalize on 'After reading this guide, you will know:'
...
We have three or four different introduction sentences to the guides.
After this commit, we use the same one everywhere.
2012-11-29 14:25:02 -08:00
Steve Klabnik
6dcae8ae9c
Add periods to the bullet points in guides.
...
Talked with @fxn about this. Bullet points should have periods at the ends.
2012-11-29 05:14:08 -08:00
Steve Klabnik
27138386ad
ActiveRecord -> Active Record
...
The proper name, as per the documentation guides, is 'Active Record.' I've
updated several references to it as 'ActiveRecord'.
2012-11-29 04:35:13 -08:00
Agis Anastasopoulos
e258225c8a
Switch to 1.9 hash syntax (guides)
2012-11-16 21:10:27 +02:00
burningTyger
8dabfbebdb
use em-dashes instead of two minuses in guides
2012-11-10 23:00:00 +01:00
Francesco Rodriguez
feb9c5f42b
remove assert_valid method from testing guide [ci skip]
2012-10-18 21:38:42 -05:00
Rafael Mendonça França
9eeb00976d
Revert "divided into folder with the language"
...
This reverts commit f5b9ed4fbc3215a5fce48985ea372ad3f1182252.
REASON: Translation work can not be done in the docrails repository
2012-10-17 10:15:55 -03:00
Rodrigo Martins
f5b9ed4fbc
divided into folder with the language
2012-10-17 03:34:10 -03:00
Mike Moore
2a68f68aea
Update test locations
...
Change the default test locations to avoid confusion around the common
testing terms "unit" and "functional".
Add new rake tasks for the new locations, while maintaining backwards
compatibility with the old rake tasks.
New testing locations are as follows:
app/models -> test/models (was test/units)
app/helpers -> test/helpers (was test/units/helpers)
app/controllers -> test/controllers (was test/functional)
app/mailers -> test/mailers (was test/functional)
2012-10-09 17:53:56 -06:00
Prem Sichanugrist
41dbb58e2d
Fix the usage of *
in Markdown
...
In Textile `*` would convert to `<strong>`, but in Markdown we have to
use `**` instead.
2012-09-17 15:54:23 -04:00
Prem Sichanugrist
2c38567646
Convert all tables to Markdown syntax
2012-09-17 15:54:23 -04:00
Prem Sichanugrist
9873dd800b
Convert all the links into Markdown format
2012-09-17 15:54:23 -04:00
Prem Sichanugrist
31ef4cf656
Convert all inline codes to Markdown syntax
2012-09-17 15:54:23 -04:00
Prem Sichanugrist
21a0b20e39
change shell to bash
2012-09-17 15:54:22 -04:00
Prem Sichanugrist
872b7af337
Convert heading tags and heading section
2012-09-17 15:54:22 -04:00
Prem Sichanugrist
7bc1ca3515
Convert code blocks into GFM style
2012-09-17 15:54:22 -04:00