diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-03-13 10:09:41 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-03-13 10:09:41 +0900 |
commit | 5ab0c1a8ccbaff92cf239aecb78c1537fd6ce1be (patch) | |
tree | 9fc5e0b23f342fae77c6e97569f9a955b8c9a267 /railties | |
parent | 18ff6020b96a447f89cfafd109c9a7cf11f05bfb (diff) | |
download | rails-5ab0c1a8ccbaff92cf239aecb78c1537fd6ce1be.tar.gz rails-5ab0c1a8ccbaff92cf239aecb78c1537fd6ce1be.tar.bz2 rails-5ab0c1a8ccbaff92cf239aecb78c1537fd6ce1be.zip |
Add test for runner command with `environment` option
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/runner_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/test/application/runner_test.rb b/railties/test/application/runner_test.rb index 8f5f48c281..d590b6f6fb 100644 --- a/railties/test/application/runner_test.rb +++ b/railties/test/application/runner_test.rb @@ -105,6 +105,10 @@ module ApplicationTests assert_match "development", rails("runner", "puts Rails.env") end + def test_environment_option + assert_match "production", rails("runner", "-e", "production", "puts Rails.env") + end + def test_runner_detects_syntax_errors output = rails("runner", "puts 'hello world", allow_failure: true) assert_not_predicate $?, :success? |