aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #19034 from jvanbaarsen/explicit-job-base-classMatthew Draper2015-03-301-1/+1
|\ | | | | | | Add explicit base class for ActiveJob jobs
| * Add explicit base class for ActiveJob jobsJeroen van Baarsen2015-03-231-1/+1
| | | | | | | | | | | | | | | | * Jobs generated now inherent from ApplicationJob * ApplicationJob inherents from ActiveJob::Base * Added entry to changelog Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | Test using sprockets 3Rafael Mendonça França2015-03-292-9/+9
| |
* | Revert "Merge pull request #19404 from dmathieu/remove_rack_env"Jeremy Kemper2015-03-202-0/+9
| | | | | | | | | | | | | | Preserving RACK_ENV behavior. This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
* | Remove `#build_original_fullpath` methodeileencodes2015-03-201-27/+0
| | | | | | | | | | | | | | | | | | | | | | Removing `#build_original_fullpath` because it is no longer used by the Rails' source code or called in the `#call` method becasue the previous commit now uses `fullpath` from Rack. The method was nodoc'ed so it's safe to remove. NOTE: I did this as a separate commit so if this does cause a problem with engines etc reverting is easy.
* | Merge pull request #19404 from dmathieu/remove_rack_envAaron Patterson2015-03-192-9/+0
|\ \ | | | | | | Don't fallback to RACK_ENV when RAILS_ENV is not present
| * | don't fallback to RACK_ENV when RAILS_ENV is not presentDamien Mathieu2015-03-192-9/+0
| |/
* | run `test_test.rb` using the `bin/rails test`.Yves Senn2015-03-181-17/+1
| |
* | `-p`, `--pattern` to run tests using a pattern.Yves Senn2015-03-181-2/+1
| |
* | use `bin/rails t` runner in `test_runner_test.rb`.Yves Senn2015-03-181-24/+18
| |
* | Show the right file when test raisesArthur Neves2015-03-181-0/+1
|/
* pass a config to the route setAaron Patterson2015-03-051-0/+13
| | | | | This way we can get the relative_url_root from the application without setting another global value
* Created rake restart task.Hyonjee Joo2015-02-261-0/+31
| | | | | | Fixes #18876. Rake restart touches `tmp/restart.txt` to restart application on next request. Updated tests and documentation accordingly.
* Require `belongs_to` by default.Josef Šimánek2015-02-211-1/+4
| | | | Deprecate `required` option in favor of `optional` for belongs_to.
* Allow Rack::Runtime to be deleted from middleware stack.Guo Xiang Tan2015-02-191-0/+16
| | | | Fixes: https://github.com/rails/rails/issues/16433.
* Merge pull request #18399 from kommen/unify-structure-file-envvar-namesRafael Mendonça França2015-02-051-1/+1
|\ | | | | | | | | | | | | Use SCHEMA instead of DB_STRUCTURE for specifiying structure file. Conflicts: activerecord/CHANGELOG.md
| * Use `SCHEMA` instead of `DB_STRUCTURE` for specifiying structure file.Dieter Komendera2015-01-081-1/+1
| | | | | | | | | | `rake test:load_structure` already uses `SCHEMA` and there's no need to maintain two different env vars.
* | Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-034-4/+0
| | | | | | | | onwards.
* | tests, use `capture` instead of custom `redirect_stderr` helper.Yves Senn2015-01-301-12/+2
|/
* Remove deprecated `serve_static_assets` configurationRafael Mendonça França2015-01-041-16/+0
|
* Remove deprecation warning when log_level is not explicit set on productionRafael Mendonça França2015-01-041-30/+0
|
* Remove deprecate `*_path` helpers in email viewsRafael Mendonça França2015-01-042-53/+0
|
* Remove some warningsRafael Mendonça França2015-01-031-32/+32
|
* actually autoload all second-level directories called `app/*/concerns`Alex Robbin2014-12-261-0/+29
|
* Merge pull request #18100 from chancancode/serve_static_filesGodfrey Chan2014-12-194-5/+61
| | | | | | Allow static asset serving from env variable (enhanced!) Conflicts: railties/CHANGELOG.md
* `db:structure:load` and `db:schema:load` no longer purge the database.Yves Senn2014-12-181-0/+25
| | | | | | | | | | | | | | | | | Closes #17945 `db:test:prepare` still purges the database to always keep the test database in a consistent state. This patch introduces new problems with `db:schema:load`. Prior to the introduction of foreign-keys, we could run this file against a non-empty database. Since every `create_table` containted the `force: true` option, this would recreate tables when loading the schema. However with foreign-keys in place, `force: true` wont work anymore and the task will crash. /cc @schneems
* fixing mailer previews for apps with globbing routeOleg2014-12-031-0/+11
|
* Fix "nonexistent" typo in testsMelissa Xie2014-12-021-1/+1
|
* Merge pull request #17866 from bogdan/default-form-builderSantiago Pastorino2014-12-011-0/+39
|\ | | | | Bugfix config.action_view.default_form_builder option
| * Bugfix config.action_view.default_form_builder optionBogdan Gusiev2014-12-011-0/+39
| |
* | Pure rack apps can be mounted with a nameJean Boussier2014-11-291-0/+20
|/ | | | See https://github.com/rails/rails/commit/9b15828b5c347395b42066a588c88e5eb4e72279#commitcomment-8764492
* bring back `db:test:prepare`.Yves Senn2014-11-252-9/+92
| | | | | | | | | | | | | | | 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.
* tests, run `test_test.rb` with `RAILS_ENV=test`.Yves Senn2014-11-251-1/+1
| | | | | | 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.
* Added tests for log_level deprecationGodfrey Chan2014-11-251-13/+18
| | | | | | Closes #17756 [Godfrey Chan, Zachary Scott]
* Set the test_order in the basic app as well, see 58e8b48Godfrey Chan2014-11-251-0/+25
| | | | This removes the unwanted deprecation warnings in the tests
* :scissors:Rafael Mendonça França2014-11-101-1/+1
|
* No need to sync config.secret_token and secrets.secret_tokenRafael Mendonça França2014-11-101-34/+2
| | | | Just prefer secrets over config
* Merge pull request #16535 from bf4/patch-1Rafael Mendonça França2014-11-104-11/+150
|\ | | | | | | Allow fallback to LegacyKeyGenerator when secret_key_base is not set but secrets.secret_token is
| * `secret_token` is now saved in `Rails.application.secrets.secret_token`Benjamin Fleischer2014-11-024-11/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `secrets.secret_token` is now used in all places `config.secret_token` was - `secrets.secret_token`, when not present in `config/secrets.yml`, now falls back to the value of `config.secret_token` - when `secrets.secret_token` is set, it over-writes `config.secret_token` so they are the same (for backwards-compatibility) - Update docs to reference app.secrets in all places - Remove references to `config.secret_token`, `config.secret_key_base` - Warn that missing secret_key_base is deprecated - Add tests for secret_token, key_generator, and message_verifier - the legacy key generator is used with the message verifier when secrets.secret_key_base is blank and secret_token is set - app.key_generator raises when neither secrets.secret_key_base nor secret_token are set - app.env_config raises when neither secrets.secret_key_base nor secret_token are set - Add changelog Run focused tests via ruby -w -Itest test/application/configuration_test.rb -n '/secret_|key_/'
* | add lib to $LOAD_PATH on application inhertence. fixes #17106Aaron Patterson2014-11-041-1/+2
| |
* | add a test for #17106Aaron Patterson2014-11-041-0/+13
| |
* | Revert "Replace String index juggling with Pathname goodness in ↵yuuji.yaginuma2014-11-021-0/+10
|/ | | | | | | | db:fixtures:load" This reverts commit 482fdad5ef8a73688b50bba3991dd4ef6f286edd. Fixes #17237.
* UrlGenerationError are not catched as 404 anymoreJean Boussier2014-10-271-0/+15
|
* 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 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
* 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.
* Add `test:jobs` taskyuuji.yaginuma2014-09-151-3/+14
|
* 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.