mirror of https://github.com/rails/rails
Add test for runner command with `environment` option
This commit is contained in:
parent
18ff6020b9
commit
5ab0c1a8cc
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue