aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Refactor create_test_file to take a pass option.Kasper Timm Hansen2015-10-071-31/+7
| | | | | | | | | | | | Lets us cut the verbose and straight up duplicated setup in 3 tests down to one line.
* | | Hide Minitest's aggregated results if outputting inline.Kasper Timm Hansen2015-10-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'd see the failures and errors reported after the run, which is needless, when we've already reported them. Turns: ``` .......................................S....................F This failed bin/rails test test/models/bunny_test.rb:14 .... Finished in 0.100886s, 1020.9583 runs/s, 1001.1338 assertions/s. 2) Failure: BunnyTest#test_something_failing [/Users/kasperhansen/Documents/code/collection_caching_test/test/models/bunny_test.rb:15]: This failed 103 runs, 101 assertions, 1 failures, 0 errors, 1 skips You have skipped tests. Run with --verbose for details. ``` Into: ``` ...................S.......................................F This failed bin/rails test test/models/bunny_test.rb:14 ...................... Finished in 0.069910s, 1473.3225 runs/s, 1444.7143 assertions/s. 103 runs, 101 assertions, 1 failures, 0 errors, 1 skips ```
* | | Revert "removing Rack::Runtime from the default stack."Aaron Patterson2015-10-031-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 37423e4ff883ad5584bab983aceb4b2b759a1fd8. Jeremy is right that we shouldn't remove this. The fact is that many engines are depending on this middleware to be in the default stack. This ties our hands and forces us to keep the middleware in the stack so that engines will work. To be extremely clear, I think this is another smell of "the rack stack" that we have in place. When manipulating middleware, we should have meaningful names for places in the req / res lifecycle **not** have engines depend on a particular constant be in a particular place in the stack. This is a weakness of the API that we have to figure out a way to address before removing the constant. As far as timing attacks are concerned, we can reduce the granularity such that it isn't useful information for hackers, but is still useful for developers.
* | | removing Rack::Runtime from the default stack.Aaron Patterson2015-10-021-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The runtime header is a potential target for timing attacks since it returns the amount of time spent on the server (eliminating network speed). Total time is also not accurate for streaming responses. The middleware can be added back via: ```ruby config.middleware.ues ::Rack::Runtime ```
* | | Merge pull request #21794 from ↵Jeremy Daer2015-09-293-156/+205
|\ \ \ | | | | | | | | | | | | | | | | jeremy/sprockets/move-asset-manifest-from-toplevel-to-config-subdir Eliminate overlapping `app/assets` load path
| * | | Eliminate overlapping `app/assets` load pathJeremy Daer2015-09-293-156/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move `app/assets/manifest.js` to `app/assets/config/manifest.js`. Avoid the suggestion that you can/should deep-link `stylesheets/foo`. * Pull in all toplevel stylesheets and JavaScripts, not just `application.js` and `.css`. Demonstrate how to use `link_directory` with a specified `.js`/`.css` type. * Fix RAILS_ENV handling in assets tests. * Shush warnings spam from third-party libs that distract from tests.
* | | | Add fail fast to test runner.Kasper Timm Hansen2015-09-291-0/+15
| | | | | | | | | | | | | | | | | | | | Passing `--fail-fast` to the test runner will now abort the test run on the first failure. The run continues on any unexpected errors.
* | | | Add inline failure reporting to test runner.Kasper Timm Hansen2015-09-281-0/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Any failures or errors will be reported inline during the run by default. Skipped tests will be reported if run in verbose mode. Any result is output with failure messages and a rerun snippet for that test. Rerun snippets won't be output after a run, unless `--defer-output` is passed.
* | | Fix test that was failing because of typoeileencodes2015-09-271-1/+1
| | | | | | | | | | | | | | | Here `app` needed to be `get` because we're getting a route. This fixes the typo so the test passes.
* | | Add missing routing tests for info controllerAditya Kapoor2015-09-271-0/+12
| | | | | | | | | | | | | | | | | | Vaguely related to #21605 where I proposed to remove index route since it was redirecting to the 'routes' action, but this was kept so I thought it made sense to add some tests regarding this.
* | | Fix typo in configuration test descritive > descriptive [ci skip]amitkumarsuroliya2015-09-261-1/+1
| | |
* | | mostly remove the ParamsParser middlewareAaron Patterson2015-09-181-2/+0
| | | | | | | | | | | | | | | This can still be added to the middleware stack, but is really not necessary. I'll follow up with a commit that deprecates the constant
* | | File encoding is defaulted to utf-8 in Ruby >= 2.1Akira Matsuda2015-09-181-1/+0
| | |
* | | Fix displaying mailer previews on non local requests.Wojciech Wnętrzak2015-09-171-1/+1
| | | | | | | | | | | | | | | When config `action_mailer.show_previews` is set, previews are displayed regardless of local request check.
* | | raise LoadError when a non-existent file or directory is specified to the ↵yuuji.yaginuma2015-09-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | test runner Currently, if a file or directory that does not exist was specified in the test runner, that argument is ignored. This commit has been modified to cause an error if there is no file or directory.
* | | remove unused require ‘set’NehaGautam2015-08-251-1/+0
| | |
* | | Migrate to Sprockets 4.Andrei Istratii2015-08-192-14/+19
|/ /
* | Merge pull request #21124 from kirs/feature/reload-i18nKasper Timm Hansen2015-08-101-0/+73
|\ \ | | | | | | Reload I18n.load_path in development
| * | Reload I18n locales in developmentKir Shatrov2015-08-101-0/+73
| | |
| * | Revert "test runner should crash with non existing file argument."Yves Senn2015-08-031-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 465f0fbca3d4a1c269038b84ec9cc248fdab5fab. This breaks some cases where non file / directory arguments are passed to the runner (for example db:migrate). I still think that we can get this to work. From what I can tell there is no reason why db:migrate is passed along to `Minitest.run`. I'll revert and investigate possible solutions.
| * | test runner should crash with non existing file argument.Yves Senn2015-08-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Before this patch, using `bin/rails test` with a non existing file or directory argument would silently swallow the argument and run the whole test suite. After the patch the command fails with `cannot load such file --`.
* | | Add rake dev:cache task to enable dev mode caching.Chuck Callebs2015-08-041-0/+35
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Taken from @Sonopa's commits on PR #19091. Add support for dev caching via "rails s" flags. Implement suggestions from @kaspth. Remove temporary cache file if server does not have flags. Break at 80 characters in railties/CHANGELOG.md Remove ability to disable cache based on server options. Add more comprehensive options: --dev-caching / --no-dev-caching
* | Fix rake/notes_testschneems2015-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | Presumably due to https://github.com/rails/sprockets-rails/pull/265 sprockets was trying to load the "scss" gem but it isn't in the gemfile: ``` ApplicationTests::RakeTests::RakeNotesTest#test_register_a_new_extension: LoadError: cannot load such file -- sass ``` If we use an empty precompile list, it won't try to load sass.
* | Fix reported regression rails/sprockets-rails#265schneems2015-07-291-0/+1
| | | | | | | | We can prevent the UglifierCompressor from being instantiated prematurely by setting precompile to an empty array in this test.
* | Make digest cache work in development.Kasper Timm Hansen2015-07-181-0/+63
| | | | | | | | | | | | Avoid computing the same fragment digest many times when looping over templates. The cache is cleared on every request so template changes are still picked up.
* | Rely on the load interlock for non-caching reloads, tooMatthew Draper2015-07-091-7/+7
| |
* | Soften the lock requirements when eager_load is disabledMatthew Draper2015-07-091-4/+21
| | | | | | | | | | We don't need to fully disable concurrent requests: just ensure that loads are performed in isolation.
* | `dump_schema_after_migration` applies migration tasks other than db:migrateYves Senn2015-06-301-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Closes #20743. The task `db:_dump` now only dumps the schema if `ActiveRecord::Base.dump_schema_after_migration` is true. This has effects: - `db:migrate:up` - `db:migrate:down` - `db:forward` - `db:rollback`
* | tests, railties tests should use `bin/` executables when possible.Yves Senn2015-06-309-121/+121
|/ | | | | We recommend using the `bin/` executables in our docs and guides. Let's make sure that our tests execute the same code path.
* Fix failing tests for Rails-APISean Griffin2015-06-111-1/+1
| | | | This looks to be just out of sync tests
* Use new hash syntaxSantiago Pastorino2015-06-111-1/+1
|
* Add test to show api only apps allow overriding generator optionsSantiago Pastorino2015-06-111-0/+16
|
* config.api_only = true implies config.generators.api_only = trueSantiago Pastorino2015-06-112-2/+1
|
* Api apps scaffold does not generate assetsSantiago Pastorino2015-06-111-0/+1
|
* Api apps scaffold does not generate helpersSantiago Pastorino2015-06-111-0/+1
|
* Api apps scaffold does not generate viewsSantiago Pastorino2015-06-111-0/+1
|
* API apps scaffold generator generates an apropriate controllerSantiago Pastorino2015-06-111-0/+20
|
* config.generators.api_only = true set rails api option on generatorsSantiago Pastorino2015-06-111-1/+2
|
* Hide assets, helper, css and js namespaces for api only appsSantiago Pastorino2015-06-111-0/+15
|
* Add AC::API + its middleware stack integration testSantiago Pastorino2015-06-111-0/+29
|
* Add config.api_only option to application and remove appropriate middleware ↵Santiago Pastorino2015-06-111-0/+27
| | | | when true
* Merge pull request #19571 from kaspth/improve-runner-integrationYves Senn2015-06-082-27/+142
|\ | | | | | | Improve Test Runner's Minitest integration.
| * Improve test runner's Minitest integration.Kasper Timm Hansen2015-06-042-27/+142
| | | | | | | | | | | | | | | | | | | | | | 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/
* | Merge pull request #20444 from y-yagi/can_use_path_helper_method_in_consoleRafael Mendonça França2015-06-061-0/+12
|\ \ | | | | | | modify console of app method in that can use the path helpers
| * | modify console of app method in that can use the path helpersyuuji.yaginuma2015-06-051-0/+12
| | |
* | | Remove warning for setting eager_loadArun Agrawal2015-06-051-1/+1
| |/ |/| | | | | | | | | AppTemplate::Application.new does not run load hooks. To load this configuration we need to use create which will run load hooks to load this configuration.
* | Merge pull request #18587 from ↵Rafael Mendonça França2015-06-031-0/+13
|\ \ | |/ |/| | | | | | | chrismcg/allow_deliver_later_queue_name_to_be_configured Allow configuration of ActionMailer queue name
| * Allow configuration of ActionMailer queue nameChris McGrath2015-06-021-0/+13
| |
* | Merge pull request #20138 from tgxworld/deprecated_assert_templateRafael Mendonça França2015-06-011-1/+1
|\ \ | | | | | | Deprecate `assert_template` and `assigns()`.
| * | Remove `assigns` and `assert_template`.Guo Xiang Tan2015-05-301-1/+1
| | |