aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | 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 ```
* | | | run against edge sass to eliminate circular require warningsAaron Patterson2015-09-301-4/+0
| | | |
* | | | Merge pull request #21794 from ↵Jeremy Daer2015-09-294-168/+229
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | jeremy/sprockets/move-asset-manifest-from-toplevel-to-config-subdir Eliminate overlapping `app/assets` load path
| * | | | Eliminate overlapping `app/assets` load pathJeremy Daer2015-09-294-168/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-292-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | 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-282-1/+51
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | |
* | | | make sure flash middleware is requiredAaron Patterson2015-09-251-0/+1
| | | |
* | | | Removed Mocha from app generators testsRonak Jangir2015-09-231-87/+106
| | | |
* | | | Remove unneeded generator variable.Kasper Timm Hansen2015-09-221-1/+0
| | | |
* | | | Removed mocha from Railites PluginGeneratorTestRonak Jangir2015-09-222-15/+35
| | | |
* | | | fix application_controller require_dependency path generated by the scaffold ↵yuuji.yaginuma2015-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | generator This is follow up to #6643. In #6643, the controller generator only had been fixed, in this commit to fix the scaffold generator.
* | | | 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.
* | | | Removed duplicate requiring minitest/mock as it is already required in ↵Ronak Jangir2015-08-261-1/+0
| | | | | | | | | | | | | | | | method_call_assertions
* | | | remove unused require ‘set’NehaGautam2015-08-251-1/+0
| | | |
* | | | override `controller_class` on the requestAaron Patterson2015-08-241-9/+9
| | | | | | | | | | | | | | | | | | | | Just like the other places. We need to refactor this because the code is almost identical to that in the action pack tests
* | | | Merge pull request #21267 from davidcornu/rails-server-port-env-varRafael Mendonça França2015-08-241-0/+7
|\ \ \ \ | | | | | | | | | | Use the PORT environment variable for rails server
| * | | | Use the PORT environment variable for rails serverDavid Cornu2015-08-181-0/+7
| | | | |
* | | | | Merge pull request #21279 from ronakjangir47/test_cleanupKasper Timm Hansen2015-08-203-43/+20
|\ \ \ \ \ | | | | | | | | | | | | Cleaned up generators tests using internal assertion helper
| * | | | | Cleaned up generators tests using internal assertion helperRonak Jangir2015-08-203-43/+20
| |/ / / /
* / / / / Migrate to Sprockets 4.Andrei Istratii2015-08-192-14/+19
|/ / / /
* / / / Updated tests for the generated version number changeDaniel Morris2015-08-161-3/+3
|/ / /
* | | Merge pull request #21124 from kirs/feature/reload-i18nKasper Timm Hansen2015-08-102-0/+86
|\ \ \ | | | | | | | | Reload I18n.load_path in development
| * | | Reload I18n locales in developmentKir Shatrov2015-08-102-0/+86
| | | |
| * | | 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 --`.
* | | | make generated scaffold functional tests work inside API enginesyuuji.yaginuma2015-08-091-0/+28
| | | | | | | | | | | | | | | | | | | | * set engine's route in setup * use fixture with engine namespace
* | | | Merge pull request #21043 from ↵Rafael Mendonça França2015-08-061-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | y-yagi/loading_fixtures_in_engine_integration_tests set the correct path to `ActionDispatch::IntegrationTest.fixture_path`
| * | | | set the correct path to `ActionDispatch::IntegrationTest.fixture_path`yuuji.yaginuma2015-07-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | `ActionDispatch::IntegrationTest.fixture_path` set by `test_help.rb`, but if the engine, path under the dummy is will be set, fixtures under test was not loaded.
* | | | | Add rake dev:cache task to enable dev mode caching.Chuck Callebs2015-08-042-0/+51
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Enable the `api_only` option for API plugins' generatorsRobin Dupret2015-07-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, running a generator inside the plugin's directory, files that are not relevant won't be generated (e.g. views or assets). This won't interfere with the application's generators configuration.
* | | | Generate an API dummy application for API pluginsRobin Dupret2015-07-231-0/+8
| | | |
* | | | Make ApplicationController inherit from AC::API for API pluginsRobin Dupret2015-07-231-0/+8
| | | |
* | | | Skip assets, helpers and views generation for API pluginsRobin Dupret2015-07-231-0/+12
|/ / /
* | | Merge pull request #20819 from y-yagi/rails_api_gemfileRafael Mendonça França2015-07-211-0/+1
|\ \ \ | | | | | | | | remove `web-console` from API app generated Gemfile
| * | | remove `web-console` from API app generated Gemfileyuuji.yaginuma2015-07-091-0/+1
| | | |
* | | | Merge pull request #20384 from kaspth/per-request-cacheDavid Heinemeier Hansson2015-07-201-0/+63
|\ \ \ \ | |_|_|/ |/| | | Use digest cache in development.
| * | | 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.
* | | | make test runner work correctly inside engineyuuji.yaginuma2015-07-122-4/+4
|/ / /
* | | 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.