Add test for runner command with environment option

This commit is contained in:
yuuji.yaginuma 2019-03-13 10:09:41 +09:00
parent 18ff6020b9
commit 5ab0c1a8cc

@ -105,6 +105,10 @@ def test_default_environment
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?