aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_help.rb
Commit message (Collapse)AuthorAgeFilesLines
* inline test runner check into `as/testing/autorun.rb`.Yves Senn2015-06-111-4/+1
| | | | | This makes it possible to easily get the runner working with existing setups that rely on `active_support/testing/autorun.rb`.
* Improve test runner's Minitest integration.Kasper Timm Hansen2015-06-041-1/+5
| | | | | | | | | | | 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/
* Use `def before_setup` instead of `setup do`eileencodes2015-05-021-2/+4
| | | | | | | | | | | | | | `setup do` creates unnecessary allocations of proc objects in test callbacks. This prevents that from happening and results in faster code. Originally I had done this as `def setup` and all Railties tests passed. See 044f9ab. Later it was reported there was an issue with this that caused routes in tests to be nil because devs don't generally call `super` in their test setups. Because of that I reverted the commit until I could find a suitble replacement. `before_setup` esentially does the same thing but without the requirement that applications call `super` in their test setups.
* Revert "Use `def setup` instead of `setup do`"eileencodes2015-03-201-4/+2
| | | | This reverts commit 044f9ab7a4d6646ddce4560bb83b58cdc0baa751.
* Move minitest pluginArthur Neves2015-03-181-6/+1
| | | | | | | Minitest Rails plugin should be loaded on test_help, so we report errors even when not running from the runner. Also fix the backtrace
* Use `def setup` instead of `setup do`eileencodes2015-03-121-2/+4
| | | | | `setup do` creates unnecessary allocations of proc objects in callbacks. This prevents that from happening and results in faster code.
* introduce `ActiveSupport::Testing::FileFixtures`.Yves Senn2015-01-281-0/+1
| | | | | | It's a thin layer to provide easy access to sample files throughout test-cases. This adds the directory `test/fixtures/files` to newly generated applications.
* Require action_controller before any other action_controller fileRafael Mendonça França2014-04-101-0/+1
| | | | | | This will load properly the loading hooks. Closes rails/sass-rails#205
* Automatically maintain test database schemaJon Leighton2014-01-021-0/+2
| | | | | | | | | | | | | | * 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".
* Change all `MiniTest` to `Minitest` since, `MiniTest` namespace has been ↵Vipul A M2013-12-181-1/+1
| | | | | | renamed to `Minitest` Ref: https://github.com/seattlerb/minitest/blob/master/History.txt
* BACKTRACE environment variable to show unfiltered backtraces.Yves Senn2013-11-041-1/+3
| | | | | | | | | | | We used to support the `BACKTRACE` environment variable but when we switched to MiniTest it got removed: f9382cd7948 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 ...`
* Added generated unit test for generator generator and new test:generators ↵Josef Šimánek2013-07-161-0/+1
| | | | rake task included in test:all rake task.
* Don't configure Turn output, we aren't using it since 3.2.0Guillermo Iguaran2013-01-071-7/+0
|
* Don't require 'turn' from rails/test_helpAaron Suggs2013-01-071-5/+2
| | | | | | | | | | | | If 'turn' is in the Gemfile with `:require => nil`, Rails should respect that. This supports the case where 'turn' may or may not be required depending on different developers' preference or environment. E.g., you require turn for local testing, but not on your CI server by putting this in `test/test_helper.rb`: require 'turn' if ENV['TURN']
* Add active_support/testing/autorunRafael Mendonça França2012-12-311-1/+1
| | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* Rename "Fixtures" class to "FixtureSet"Alexey Muranov2012-10-071-2/+2
| | | | Rename `ActiveRecord::Fixtures` class to `ActiveRecord::FixtureSet`. Instances of this class normally hold a collection of fixtures (records) loaded either from a single YAML file, or from a file and a folder with the same name. This change make the class name singular and makes the class easier to distinguish from the modules like `ActiveRecord::TestFixtures`, which operates on multiple fixture sets, or `DelegatingFixtures`, `::Fixtures`, etc., and from the class `ActiveRecord::Fixture`, which corresponds to a single fixture.
* use Rails backtrace in testsFrancesco Rodriguez2012-10-051-0/+4
|
* update test_help to config properly turn natural language optionFrancesco Rodriguez2012-07-061-1/+4
| | | | | | | | | | | | Last versions of Turn don't monkey patch MiniTest to setup the natural language option. Here is an [example](https://github.com/TwP/turn/blob/master/try/test_autorun_minitest.rb#L3). This patches the following behaviour: $ rake test:units `<top (required)>': undefined method `use_natural_language_case_names=' for MiniTest::Unit:Class (NoMethodError)
* Remove IdentityMapCarlos Antonio da Silva2012-03-131-4/+0
|
* if turn available then ↵Vishnu Atrai2012-01-071-4/+1
| | | | MiniTest::Unit.respond_to?(:use_natural_language_case_names=) available
* Merge pull request #4360 from rafaelfranca/patch-1Aaron Patterson2012-01-061-13/+6
|\ | | | | Remove more references to Test::Unit
| * MiniTest is always defined in this caseRafael Mendonça França2012-01-061-8/+6
| |
| * Test::Unit::Util::BacktraceFilter is never definedRafael Mendonça França2012-01-061-5/+0
| |
* | require minitest rather than test/unitAaron Patterson2012-01-061-1/+1
|/
* do not require a file that is not usedAaron Patterson2012-01-051-2/+0
|
* Modified how to handle if ActiveRecord is defined.Yasuo Honda2011-09-301-1/+1
|
* Removed AS core_ext/kernel/requires as it's not used and is bad practice.Josh Kalderimis2011-05-231-1/+0
|
* make turn a soft dependency. generate a Gemfile that contains turn and ↵Aaron Patterson2011-04-081-3/+7
| | | | require turn if it is available
* Moved Turn activation/dependency to railtiesDavid Heinemeier Hansson2011-03-311-0/+8
|
* Merge remote branch 'rails/master' into identity_mapEmilio Tagua2010-12-201-11/+0
|\ | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb
| * do not require ruby-debug automatically. please require it if you have ↵Aaron Patterson2010-11-191-11/+0
| | | | | | | | declared it as a dependency
* | Flush IdentityMap when running tests.Emilio Tagua2010-11-191-0/+4
|/
* Remove deprecated stuff in ActionControllerCarlos Antonio da Silva2010-09-261-1/+1
| | | | | | 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.
* Update abort message (ht: tilsammans).José Valim2010-09-251-1/+1
|
* only abort in test_help in production envDavid Chelimsky2010-09-241-3/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make assert_recognizes work in IntegrationTest [#4390 state:committed]Matthew Rudy Jacobs2010-04-241-1/+3
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Missed a few spots in railtiesJoshua Peek2010-03-301-1/+1
|
* Explicitly require files before monkey patching them.José Valim2010-03-231-1/+5
|
* Better with #abortJoao Carlos2010-03-031-4/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* #exit accepts an integer, not a stringJoao Carlos2010-02-281-1/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename named_url_helpers to url_helpers and url_helpers to url_forCarlhuda2010-02-261-1/+1
|
* Get URL helpers working again in integration tests.Carlhuda2010-02-251-0/+4
|
* Final pass at removing the router from a global constantCarlhuda2010-02-251-0/+6
|
* Resolve test/unit load ordering by removing backtrace filter from boot ↵Jeremy Kemper2010-02-111-0/+6
| | | | initializers
* Get everyone running on Rails.env and fix the broken environment settings ↵David Heinemeier Hansson2010-01-111-1/+1
| | | | for script/console and script/dbconsole
* use_instantiated_fixtures and use_transactional_fixtures defaults are set in ↵Joshua Peek2010-01-041-2/+0
| | | | active_record/fixtures
* rack and rack-test are pulled in by ADJoshua Peek2010-01-041-3/+0
|
* Autoload AR test caseJoshua Peek2010-01-041-3/+0
|
* Autoload AMo test caseJoshua Peek2010-01-041-2/+0
|
* Autoload AM test case classJoshua Peek2010-01-041-1/+0
|