aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/railtie.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* rake -T should load development env by default, not testTimo Kilpilehto2017-05-101-1/+1
|
* Refactor config settings to use generated fileeileencodes2017-02-201-13/+1
| | | | | | | | | | | | | | | | | | | Originally I had set up system testing to have one configuration option to be set in the test environment. After thinking it over I think a generated class on app creation would be best. The reason for this is Capybara has a ton of configuration options that I'm sure some folks want to use. Thinking about how we handle screenshots, database transactions, and a whole bunch of other settings it would be better for users to be able to turn all of that on and off. When an app or scaffold is generated a `test/system_test_helper.rb` test helper will be generated as well. This will contain the class for tests to inherit from `ActionSystemTestCase` which will inherit from `ActionSystemTest::Base`. Here is where users can change the test driver, remove the screenshot helper, and add their additional Capybara configuration.
* Don't load ActionSystemTest in productioneileencodes2017-02-201-0/+12
| | | | | | | | | | By moving to the TestUnit Railtie, and doing the file requirement inside the onload call we can avoid loading ActionSystemTest in production and load it in the test env. This is important for performance reasons - loading up unnecessary files and object is expensive, especially when they should never be used in production.
* Add generators and ability to run system testseileencodes2017-02-201-0/+1
| | | | | | | * Generates system test requirements with new Rails app * Includes required default gems in Gemfile for Rails app * Generates a single system test case * Generates a system test case with scaffold
* Use `on_load` to trigger commandline processing codeAaron Patterson2016-10-211-0/+8
| | | | We need to use on_load so that plugins will get the same functionality
* Prevent the test framework from being loaded in production modeAaron Patterson2016-10-211-6/+0
| | | | | | | | | | | | The test framework should not be autoloaded in production mode. Before this commit, the testing railtie would extend AS::TestCase. This caused AS::TestCase to be preloaded regardless of the environment in which we were running. This commit just moves the code that adds line filtering support in to the test command where we actually execute the test runner. That allows us to maintain the line runner feature but only load the minimal amount of code we need.
* applies new string literal convention in railties/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Extract line filtering to Railties.Kasper Timm Hansen2016-01-091-0/+6
| | | | | | | | | | | | The line filter parsing added to ActiveSupport::TestCase is only half the story to enable line filtering. The other half, of adding the patterns to the options, is done in the Minitest plugin that Railties has. Thus it makes more sense to have the filter in Railties with the other half and all the line filtering tests. Move the filter and extend Active Support in an initializer, so that when users or `rails/all.rb` require `rails/test_unit/railtie` we can still filter by line.
* Revert "Merge pull request #12778 from etehtsea/rake-default-fix"Yves Senn2014-05-281-1/+1
| | | | | | | | | | | | | This reverts commit ec0a2b57f67c9153cb5f7bbe2a3f66d13fe64bdd, reversing changes made to a8bd7b16260c217290ef8fe3a166fcceac442c62. This reverts commit 555ec36522011862c03b483c53be32410594a51e This reverts commit 555ec36522011862c03b483c53be32410594a51e By default, Rails uses the `default` Rake task to run all tests. This commit changed the environment of the default task to `development`. This clears the development database and has other negative consequences.
* Don't load test env by defaultKonstantin Shabanov2013-11-111-1/+1
|
* condition simplifiedOleg Sukhodolsky2013-05-281-1/+1
|
* Fixes bug 10628.Scott Hill2013-05-151-1/+1
|
* Moved the check for the rails test environment into rails/test_unit so that youwangjohn2013-04-231-0/+4
| | | | can select frameworks separately when running rake test.
* remove performance tests from the default stackYves Senn2013-01-101-1/+0
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-2/+2
|
* Added config.app_generators to allow configuring application's generators ↵Piotr Sarnacki2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from railties. With config.generators becomes a way to configure generators for current instance only. For example: module Blog class Engine < Rails::Engine config.generators do |g| g.orm :active_record end config.app_generators do |g| g.test_framework :rspec end end end such definition sets :active_record as orm for engine and :rspec as test_framework for application. The values set with app_generators can be overwritten in application using config.generators as you would normally do: module MyApp class Application < Rails::Application config.generators do |g| g.test_framework :test_unit end end end
* Move application configuration to the application configuration object, ↵José Valim2010-03-261-2/+0
| | | | remove railtie_name and engine_name and allow to set the configuration object.
* Resolve test/unit load ordering by removing backtrace filter from boot ↵Jeremy Kemper2010-02-111-9/+1
| | | | initializers
* Check if Test::Unit is defined before adding backtrace filter.José Valim2010-02-071-1/+1
|
* Add backtrace cleaner on test unit railtie.José Valim2010-02-071-0/+8
|
* Only load testing tasks if test unit is being used.José Valim2010-01-291-2/+2
|
* Cleanup the test_unit generator move into the railtieCarl Lerche2010-01-281-1/+7
|
* Test::Unit Railtie Carlhuda2010-01-281-0/+11