Commit Graph

22 Commits

Author SHA1 Message Date
yuuji.yaginuma
084a3908fc raise LoadError when a non-existent file or directory is specified to the test runner
Currently, if a file or directory that does not exist was specified in the test runner,
that argument is ignored.
This commit has been modified to cause an error if there is no file or directory.
2015-09-07 08:13:50 +09:00
Yves Senn
a8f250a22c tests, railties tests should use bin/ executables when possible.
We recommend using the `bin/` executables in our docs and guides.
Let's make sure that our tests execute the same code path.
2015-06-30 11:19:01 +02:00
Kasper Timm Hansen
b6fc8e25a1 Improve test runner's Minitest integration.
This also adds free mix and matching of directories, files and lines filters.
Like so:

bin/rails test models/post_test.rb test/integration models/person_test.rb:26

You can also mix in a traditional Minitest filter:

bin/rails test test/integration -n /check_it_out/
2015-06-04 20:57:08 +02:00
Yves Senn
ac5ead59ae -p, --pattern to run tests using a pattern. 2015-03-18 09:52:19 +01:00
Yves Senn
f78708c180 use bin/rails t runner in test_runner_test.rb. 2015-03-18 09:52:18 +01:00
Yves Senn
1fa7861bc9 tests, use capture instead of custom redirect_stderr helper. 2015-01-30 12:04:57 +01:00
yuuji.yaginuma
14f07fdc07 Add test:jobs task 2014-09-15 09:43:02 +09:00
Ryan Davis
3073c53198 Updates to make rails 4 happy with minitest 5:
+ Namespace changes, overhaul of runners.
+ Internal ivar name changes
- Removed a logger globally applied to tests that spew everywhere?!?
+ Override Minitest#__run to sort tests by name.
+ Reworked testing isolation to work with the new cleaner architecture.
- Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago.
- Minor report output differences.
2013-05-06 17:38:45 -07:00
Aaron Patterson
cc0c392c77 add integration test for shorthand rake tests 2013-04-05 17:12:23 -07:00
Aaron Patterson
88cf64a669 extract test info from the command line and set up the test task 2013-04-05 16:38:37 -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
Aaron Patterson
c037659294 do not blow away the test database on every run 2013-04-05 14:22:29 -07:00
Aaron Patterson
328814b000 switch the testing tests to use rake 2013-04-03 12:16:19 -04:00
Aaron Patterson
62a080309b apps that depend on active record should load fixtures 2013-04-03 12:16:18 -04:00
Carlos Antonio da Silva
816e7d1449 Replace assert_(no_)match args from regexps to strings to remove warnings
Using regexps as arguments without parentheses end up raising:

    warning: ambiguous first argument; put parentheses or even spaces
2013-03-11 15:54:43 -03:00
Prem Sichanugrist
773425420f Make sure that the test case is run under test env
* Unset $RAILS_ENV that got set by abstract_unit to trigger the default.
* split out environment setting since Ruby 1.9.3 doesn't support inline
  ENV setting.
2013-03-11 14:31:27 -04:00
Prem Sichanugrist
1f8953382f Fix test failure introduced in 3ed41e57
I forgot to run the test suit after changing the task name. 💣
2013-03-11 11:58:36 -04:00
Prem Sichanugrist
3ed41e579e Make sure that rails test load test in test env 2013-03-09 17:38:39 -05:00
Dalibor Nasevic
df85dfa6fa Improve wording for rails test command 2013-03-09 16:03:55 -05:00
Prem Sichanugrist
1a0c58b298 Load fixtures only when running suites, or -f
* `rails test -f` will run the test suites with all fixtures loaded
* New application will now generated without `fixtures :all` line
  enabled by default.
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 and Chris Toomey
b4df25366a Add rails test command to run the test suite
To run the whole test suite:

    $ rails test

To run the test file(s):

    $ rails test test/unit/foo_test.rb [test/unit/bar_test.rb ...]

To run the test suite

    $ rails test [models,helpers,units,controllers,mailers,...]

For more information, see `rails test --help`.

This command will eventually replacing `rake test:*`, and `rake test`
command will actually invoking `rails test` instead.
2013-03-09 16:03:54 -05:00