1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Yves Senn
5c4495538b bring back db:test:prepare.
This reverts deprecations added in #13528.
The task is brought back for two reasons:
  1. Give plugins a way to hook into the test database initialization process
  2. Give the user a way to force a test database synchronization

While `test:prepare` is still a dependency of every test task, `db:test:prepare`
no longer hooks into it. This means that `test:prepare` runs before the schema
is synchronized. Plugins, which insert data can now hook into `db:test:prepare`.

The automatic schema maintenance can't detect when a migration is rolled-back,
modified and reapplied. In this case the user has to fall back to `db:test:prepare`
to force the synchronization to happen.
2014-11-25 18:17:01 +01:00
Yves Senn
7836e887d7 tests, run test_test.rb with RAILS_ENV=test.
The tests to verify our testing setup used `RAILS_ENV=development`
to execute the tests. Let's keep it as close to a real-world setup
as possible.
2014-11-25 13:56:29 +01:00
Yves Senn
53dba73dc1 Revert "Revert "Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format""
This reverts commit 5c87b5c524.
2014-08-06 08:25:18 +02:00
Rafael Mendonça França
5c87b5c524 Revert "Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format"
This reverts commit 46139d33c0, reversing
changes made to 8f247871bb.

Conflicts:
	activerecord/CHANGELOG.md
2014-07-02 09:41:52 -03:00
Wojciech Wnętrzak
ad42aaed04 Fixed automatic maintaining test schema to properly handle sql structure schema format.
Additionally:
* It changes `purge` task on `sqlite3` adapter to recreate database file, to
be consistent with other adapters.
* Adds `purge` step when loading from `schema.rb`
2014-06-12 13:08:56 +02:00
Wojciech Wnętrzak
df6dc1b51a Added missing test case for migrations when using sql structure 2014-06-01 17:30:05 +02: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
84eac5dab8 BACKTRACE environment variable to show unfiltered backtraces.
We used to support the `BACKTRACE` environment variable but when
we switched to MiniTest it got removed: f9382cd794

This commit adds back the functionality to show the unfiltered backtrace when needed.
This also works when you run your tests with `rake`:

* `BACKTRACE=1 bin/rake test`
* `BACKTRACE=1 ruby -Itest ...`
2013-11-04 10:00:44 +01:00
Yves Senn
ce8e3d3072 remove performance tests from the default stack 2013-01-10 17:09:06 +01:00
Aaron Patterson
8f309e3105 convert railties to use AS::TestCase 2012-01-05 17:30:17 -08:00
Vishnu Atrai
a1a5c40dad Test::Unit::Util::BacktraceFilter not available in ruby19 test/unit 2011-12-26 01:51:05 +05:30
Aaron Patterson
4da879079e run_test method conflicts with newer minitest, so change the name 2011-11-30 09:08:30 -08:00
Jon Leighton
62570e8626 Solve the RAILS_ENV problem in the railties tests in a more generic way 2011-06-06 13:54:05 +01:00
Jan Xie
ebc5ef0e66 add tests for performance test 2011-05-05 17:15:22 +08:00
Carlos Antonio da Silva
7fc1edd790 Remove deprecated stuff in ActionController
This removes all deprecated classes in ActionController related to
Routing, Abstract Request/Response and Integration/IntegrationTest.
All tests and docs were changed to ActionDispatch instead of ActionController.
2010-09-26 02:13:45 +08:00
José Valim
518b4ff478 Check if Test::Unit is defined before adding backtrace filter. 2010-02-07 14:51:23 +01:00
Joshua Peek
8ff4faf66a assert_template depends on AV::Template monkey patches in action_view/test_case 2010-01-05 11:48:06 -06:00
Joshua Peek
947bbc170e Smoke test for test_help 2010-01-04 17:13:45 -06:00