Commit Graph

72 Commits

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