aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/runner_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* support `-` as an argument to `rails runner`Cody Cutrer2017-07-171-0/+8
| | | | | | | | | | | | | in Rails 4.0, you could use `/dev/stdin` on both Linux and Mac, but with the switch to Kernel.load in Rails 4.1, this broke on Linux (you get a LoadError). Instead, explicitly detect `-` as meaning stdin, then read from stdin explicitly, instead of performing file gymnastics. This should now work on any platform uniformly. Passing a script via stdin is useful when you're sshing to a server, and the script you want to run is stored locally. You could theoretically pass the entire script on the command line, but in reality you'll run into problems with the command being too long.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Fixup trailing whitespace, per complaints from CodeClimate.Robert Thau2017-03-221-1/+1
|
* Correctly reset ARGV for "rails runner `CODE' arg arg arg..."Robert Thau2017-03-221-0/+8
| | | | | | The code itself should not be in the ARGV vector. Fixes #28515
* Pass `rails runner` args onto file again.Kasper Timm Hansen2016-11-201-0/+8
| | | | | | | | | When making the new command insfrastructure I had missed that `bin/rails runner some_file.rb some args` would pass the extra args onto the file in `ARGV`. Now fixed by allowing the command to take extra args again, and make sure to remove the file name from `ARGV`.
* Prevent the test framework from being loaded in production modeAaron Patterson2016-10-211-0/+9
| | | | | | | | | | | | 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.
* Initial command structure.Kasper Timm Hansen2016-09-251-1/+1
|
* applies project convention for string literalsXavier Noria2016-08-071-1/+1
|
* Merge pull request #24260 from ↵Kasper Timm Hansen2016-08-071-4/+6
|\ | | | | | | | | y-yagi/show_error_message_when_error_raised_in_rails_runner show error message when error raised in rails runner
| * show error message when error raised in rails runneryuuji.yaginuma2016-08-031-4/+6
| |
* | applies new string literal convention in railties/testXavier 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.
* Remove unused boot_rails method and it's usagePrathamesh Sonpatki2016-07-041-3/+2
| | | | | - The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b. - So let's remove it and its usage.
* Provide a better error message if a user mistypes the name of script with runnerStephen Blackstone2016-01-051-0/+10
| | | | Add tests for detecting bad options for runner
* tests, railties tests should use `bin/` executables when possible.Yves Senn2015-06-301-10/+10
| | | | | We recommend using the `bin/` executables in our docs and guides. Let's make sure that our tests execute the same code path.
* Revert "Merge pull request #19404 from dmathieu/remove_rack_env"Jeremy Kemper2015-03-201-0/+6
| | | | | | | Preserving RACK_ENV behavior. This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
* don't fallback to RACK_ENV when RAILS_ENV is not presentDamien Mathieu2015-03-191-6/+0
|
* script => binAkira Matsuda2013-01-181-6/+6
|
* Refactor tests that switch RAILS_ENV and RACK_ENVCarlos Antonio da Silva2012-12-061-12/+8
| | | | | | | | | | | | This cleanup aims to fix a build failure: https://travis-ci.org/rails/rails/jobs/3515951/#L482 Since travis always have both ENV vars set to "test", a test is failing where it's expected to output the default env "development", but "test" is the result due to RACK_ENV being set when we expect it to not be. By cleaning this duplication we ensure that changing any of these env variables will pick the right expected value.
* Fix duplicated method nameCarlos Antonio da Silva2012-12-051-2/+1
| | | | [ci skip]
* Add ENV['RACK_ENV'] support to rake runner/console/server.kennyj2012-12-061-0/+23
|
* Add support runner hook.kennyj2012-05-291-0/+10
|
* convert railties to use AS::TestCaseAaron Patterson2012-01-051-1/+1
|
* make 'rails runner' show usage when run without any optionsVijay Dev2011-06-101-0/+4
|
* Solve the RAILS_ENV problem in the railties tests in a more generic wayJon Leighton2011-06-061-0/+4
|
* Send 'rails runner' help message to stdout instead of stderr.rohit2010-09-191-2/+1
| | | | | | [#5661 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Fix output of 'rails runner --help' [#4249 state:open]rohit2010-09-181-0/+5
|
* Fix indentJeremy Kemper2010-07-021-1/+1
|
* Added 4 tests for Rails Runner. 2 failing tests for $0 and $PROGRAM_NAME ↵rohit2010-06-221-0/+49
[#2244 state:open] Signed-off-by: José Valim <jose.valim@gmail.com>