aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add back --skip-turbolinks and remove --skip-gemsRafael Mendonça França2014-10-261-3/+2
|/ | | | | | | For the most part of cases --skip-gems option just remove one line in the Gemfile. This is not worth for the complexity it adds. Closes #17196
* :nail_care: it's -> its (see comments on 9a586ac)Godfrey Chan2014-10-181-1/+1
|
* [ci skip] A Rails engine is not a man :ok_woman:Zachary Scott2014-10-181-1/+1
|
* test, `Generators::GeneratedAttribute` with references, required, index.Yves Senn2014-10-161-0/+8
| | | | | | | | | | | | | Closes #17197. Closes #17207. `{required}` is a type modifier so it should be: user:references{required}:index and not: user:references:index{required}
* Don't need to account turbolinks cookies in get request.Rafael Mendonça França2014-10-131-6/+6
| | | | | | | It was changed to not set the cookie in get requests at https://github.com/rails/turbolinks/commit/62cc3db457ad9745ccda047dd43ab84fb3d89707. Related with dcb05f26.
* fix test_helper for mountable pluginmasarakki2014-10-131-0/+4
|
* Remove unused codeRafael Mendonça França2014-09-251-12/+1
|
* Remove --skip-action-view option from application generatorDan Olson2014-09-241-5/+0
|
* Fix another false assertionsYuki Nishijima2014-09-211-1/+1
| | | | | | | | | | | | * The assertions in AS::Duration don't actually assert. * The assertion in Railtie will pass even when `eager_load_namespaces` doesn't include `AppTemplate::Application` if `Rails.application` is truthy. For more details, see here: * https://github.com/rails/rails/pull/16998 * https://github.com/rails/rails/pull/17000
* Merge pull request #16936 from untidy-hair/plugin_test_db_migrate_pathRafael Mendonça França2014-09-181-3/+12
|\ | | | | | | | | | | | | Specify dummy app's db migrate path in plugin's test_helper.rb Conflicts: railties/CHANGELOG.md
| * Specify dummy app's db migrate path in plugin's test_helper.rbYukio Mizuta2014-09-161-3/+12
| |
* | inject Rack::Lock if config.eager_load is falseXavier Noria2014-09-181-2/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | If code is not eager loaded constants are loaded on demand. Constant autoloading is not thread-safe, so if eager loading is not enabled multi-threading should not be allowed. This showed up in certain Capybara scenarios: Most Capybara drivers other than Rack::Test need a web server. In particular, drivers for JavaScript support. Capybara launches WEBrick in its own thread for those but that per se is fine, because the spec thread and the server thread are coordinated. Problem comes if the page being served in the spec makes Ajax calls. Those may hit WEBrick in parallel, and since WEBrick is multi-threaded and allow_concurrency? returns true in the test environment before this patch, threads are spawned to serve those parallel requests. On the other hand, since eager_load is false by default in the test environment, constants are not preloaded. So the suite is autoloading constants in a multi-threaded set. That's a receipt for paracetamol. The symptom is random obscure errors whose messages point somehow to constant autoloading. As a consequence of this fix for allow_concurrency? WEBrick in Capybara scenarios no longer runs in multi-threaded mode. Fixes #15089.
* Merge pull request #16914 from untidy-hair/fix_plugin_dummy_path_errorRafael Mendonça França2014-09-161-1/+4
|\ | | | | Use dynamic path for dummy app location in plugin's test_helper.rb
| * Use dynamic path for dummy app location in plugin's test_helper.rbYukio Mizuta2014-09-141-1/+4
| |
* | Add `test:jobs` taskyuuji.yaginuma2014-09-151-3/+14
|/
* Always define capture to remove the deprecation messageRafael Mendonça França2014-09-111-17/+15
|
* Define the configuration at Active SupportRafael Mendonça França2014-09-112-0/+2
|
* Set test order in ActiveSupport::TestCase of isolation/abstract_unitRafael Mendonça França2014-09-101-0/+2
|
* Set the test order to be random in the generated appRafael Mendonça França2014-09-101-0/+1
| | | | | | This will avoid the warning in our tests. We delete all the config/environments/ files in the test app so our default code will not work.
* Merge pull request #16839 from chancancode/default_test_orderRafael Mendonça França2014-09-101-1/+1
|\ | | | | | | Default to sorting user's test cases for now
| * Default to sorting user's test cases for nowGodfrey Chan2014-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Goals: 1. Default to :random for newly generated applications 2. Default to :sorted for existing applications with a warning 3. Only show the warning once 4. Only show the warning if the app actually uses AS::TestCase Fixes #16769
* | Tell the user which file is missing when config/database.yml was not foundAkira Matsuda2014-09-101-0/+9
|/ | | | | | Since cc03675d30b58e28f585720dad14e947a57ff5b the error message became like "Could not load database configuration. No such file -" which doesn't really tell what's actually missing.
* build fix, we have to reset the RACK_ENV as well.Yves Senn2014-09-041-2/+5
| | | | | This is a follow-up to ded17a4 to get the build passing on Travis. As Travis has `ENV["RACK_ENV"]` set to `test` we need to reset that as well.
* Merge pull request #16775 from kaspth/ship-secure-sanitizerRafael Mendonça França2014-09-031-41/+0
|\ | | | | Ship with rails-html-sanitizer instead.
| * Ship with rails-html-sanitizer instead.Kasper Timm Hansen2014-09-031-41/+0
| |
* | Merge pull request #16756 from huoxito/dont-mess-railties-default-orderRafael Mendonça França2014-09-031-0/+36
|\ \ | | | | | | Dont mess with default order engines load (4.1.6.rc1 regression)
| * | Dont mess with default order engines loadWashington Luiz2014-09-021-0/+36
| | | | | | | | | | | | | | | | | | | | | When copying migrations some engines might depend on schema from other engine so we can't blindly reverse all railties collection as that would affect the order they were originally loaded. This patch helps to only apply the order from engines specified in `railties_order`
* | | schema loading rake tasks maintain database connection for current env.Yves Senn2014-09-031-0/+26
| |/ |/| | | | | | | | | | | | | | | | | [Joshua Cody & Yves Senn] Closes #16757. Prior to this patch schema loading rake tasks had the potential to leak a connection to a different database. This had side-effects when rake tasks operating on the current connection (like `db:seed`) were chained.
* | Leave all our tests as order_dependent! for nowMatthew Draper2014-09-021-0/+4
| | | | | | | | | | | | | | | | | | We're seeing too many failures to believe otherwise. This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57, cbde413df3839e06dd14e3c220e9800af91e83ab, bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and 2440933fe2c27b27bcafcd9019717800db2641aa.
* | Add test to assert the right sanitizer vendor is being usedRafael Mendonça França2014-09-011-0/+41
|/
* Expectations firstAkira Matsuda2014-08-284-9/+9
|
* Reset RACK_ENV after modified in a test caseAkira Matsuda2014-08-281-0/+1
|
* Rails.root should be a PathnameAkira Matsuda2014-08-281-1/+1
|
* fix broken `gem` method with non-String arguments. Closes #16709.Yves Senn2014-08-271-0/+10
| | | | This was caused by #15327.
* Refactor ActionDispatch::RemoteIpSam Aarons2014-08-211-1/+15
| | | | | | | | | | | | | Refactored IP address checking in ActionDispatch::RemoteIp to rely on the IPAddr class instead of the unwieldly regular expression to match IP addresses. This commit keeps the same api but allows users to pass IPAddr objects to config.action_dispatch.trusted_proxies in addition to passing strings and regular expressions. Example: # config/environments/production.rb config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.0/16')
* Require ActiveJob in case a skip_xxx option is givenslainer682014-08-201-0/+1
| | | | Change position of require active_job
* Fix failing railties testsCarlos Antonio da Silva2014-08-191-2/+6
| | | | | | | | | | | | A combination of two commits led into these failures: * The addition of a new active_record config in 24bb8347b6ff0da90059314d9aece7a2c94a272c * The revert of the config to use config.x as options holder in 43073b393d234acd094ac7c220163f4e419d11f5 These tests remove activerecord from the load path, however the configuration is still in the application file, and they blow up.
* Fix setting simple values to the new config.xCarlos Antonio da Silva2014-08-191-5/+12
| | | | | | | | | | Previously setting simple values to the config.x object resulted in the following: config.x.super_debugger = true config.x.super_debugger #=> {} Which was against the examples showed in the changelog/release notes.
* Revert "Improve custom configuration"Rafael Mendonça França2014-08-193-80/+9
| | | | | | | | | This reverts commit de4891344ccc074f6d5693f4fac6ad610584e336. Conflicts: railties/lib/rails/railtie/configuration.rb It added regression. Will be back after the beta
* Improve custom configurationRafael Mendonça França2014-08-193-9/+80
| | | | | | | | | | | | | | | | 1. Hashes can be assigned 2. We don't need a special level anymore The method chain only works in the top level. If users need a second level they need to assign a OrderedOptions to the key: config.resque.server = ActiveSupport::OrderedOptions.new config.resque.server.url = "http://localhost" config.resque.server.port = 3000 [Rafael Mendonça França + Carlos Antonio da Silva]
* Merge pull request #16062 from sgrif/sg-required-generatorsRafael Mendonça França2014-08-172-0/+56
|\ | | | | Add a `required` option to the model generator
| * Add a `required` option to the model generatorSean Griffin2014-08-082-0/+56
| | | | | | | | | | | | | | | | | | | | | | Syntax was chosen to follow the passing of multiple options to decimal/numeric types. Curly braces, and allowing any of `,`, `.`, or `-` to be used as a separator to avoid the need for shell quoting. (I'm intending to expand this to all columns, but that's another PR. The `required` option will cause 2 things to change. `required: true` will be added to the association. `null: false` will be added to the column in the migration.
* | Merge pull request #16481 from sgrif/sg-change-default-timestampsDavid Heinemeier Hansson2014-08-171-1/+1
|\ \ | | | | | | Change the default `null` value for timestamps
| * | Change the default `null` value for timestampsSean Griffin2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* | | Railties tests are order_independent! Hopefully.Akira Matsuda2014-08-131-4/+0
| | |
* | | Fix Railties tests that were order dependentAkira Matsuda2014-08-131-0/+10
|/ /
* | Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
| |
* | users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+4
| | | | | | | | | | Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes everyone's tests order dependent, which should never be done by the framework.
* | add a test for prepending SCRIPT_NAME to generated urlsAaron Patterson2014-08-081-0/+88
| |
* | Fixes test for Gemfile entry changesArun Agrawal2014-08-081-6/+11
|/ | | | Broken by fbe38c9e9d4fe9f82518e8ffc1d757459b0c5f1c