Commit Graph

193 Commits

Author SHA1 Message Date
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