提交 60d2322a 编写于 作者: M Mohit Natoo

- Made changes to have test cases in actions_test more readable.

Changed description with tests related to rails_command.
上级 259032e2
......@@ -215,7 +215,7 @@ def test_rails_with_env_option_should_run_rake_command_in_env
end
end
test "rails with RAILS_ENV variable should run rake command in env" do
test "rails command with RAILS_ENV variable should run rake command in env" do
assert_called_with(generator, :run, ['rails log:clear RAILS_ENV=production', verbose: false]) do
with_rails_env "production" do
action :rake, 'log:clear'
......@@ -231,7 +231,7 @@ def test_rails_with_env_option_should_run_rake_command_in_env
end
end
def test_rails_with_sudo_option_should_run_rake_command_with_sudo
test "rails command with sudo option should run rake command with sudo" do
assert_called_with(generator, :run, ["sudo rails log:clear RAILS_ENV=development", verbose: false]) do
with_rails_env nil do
action :rake, 'log:clear', sudo: true
......@@ -239,7 +239,7 @@ def test_rails_with_sudo_option_should_run_rake_command_with_sudo
end
end
def test_rails_command_should_run_rails_command_with_default_env
test "rails command should run rails_command with default env" do
assert_called_with(generator, :run, ["rails log:clear RAILS_ENV=development", verbose: false]) do
with_rails_env nil do
action :rails_command, 'log:clear'
......@@ -247,13 +247,13 @@ def test_rails_command_should_run_rails_command_with_default_env
end
end
def test_rails_command_with_env_option_should_run_rails_command_in_env
test "rails command with env option should run rails_command with same env" do
assert_called_with(generator, :run, ['rails log:clear RAILS_ENV=production', verbose: false]) do
action :rails_command, 'log:clear', env: 'production'
end
end
def test_rails_command_with_rails_env_variable_should_run_rails_command_in_env
test "rails command with RAILS_ENV variable should run rails_command in env" do
assert_called_with(generator, :run, ['rails log:clear RAILS_ENV=production', verbose: false]) do
with_rails_env "production" do
action :rails_command, 'log:clear'
......@@ -269,7 +269,7 @@ def test_env_option_should_win_over_rails_env_variable_when_running_rails
end
end
def test_rails_command_with_sudo_option_should_run_rails_command_with_sudo
test "rails command with sudo option should run rails_command with sudo" do
assert_called_with(generator, :run, ["sudo rails log:clear RAILS_ENV=development", verbose: false]) do
with_rails_env nil do
action :rails_command, 'log:clear', sudo: true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册