diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-02-29 10:50:37 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-02-29 10:50:37 -0300 |
commit | 8f96b5d52c46f44613a5146a62c2aebbe231432d (patch) | |
tree | bccccd54417025360f29079d2cb746705abebd22 /railties/test | |
parent | 29443fe85b74ce77ebd4c2fb504dd03c66984572 (diff) | |
parent | 60d2322ad795869025570c44a553184dc047a2fc (diff) | |
download | rails-8f96b5d52c46f44613a5146a62c2aebbe231432d.tar.gz rails-8f96b5d52c46f44613a5146a62c2aebbe231432d.tar.bz2 rails-8f96b5d52c46f44613a5146a62c2aebbe231432d.zip |
Merge pull request #23962 from mohitnatoo/rails_command_test_semantics
Having more readable test descriptions in railties actions_test.rb
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/actions_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 6158748194..58394a11f0 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -201,7 +201,7 @@ class ActionsTest < Rails::Generators::TestCase end end - def test_rake_should_run_rake_command_with_default_env + def test_rails_should_run_rake_command_with_default_env assert_called_with(generator, :run, ["rails log:clear RAILS_ENV=development", verbose: false]) do with_rails_env nil do action :rake, 'log:clear' @@ -209,13 +209,13 @@ class ActionsTest < Rails::Generators::TestCase end end - def test_rake_with_env_option_should_run_rake_command_in_env + def test_rails_with_env_option_should_run_rake_command_in_env assert_called_with(generator, :run, ['rails log:clear RAILS_ENV=production', verbose: false]) do action :rake, 'log:clear', env: 'production' end end - def test_rake_with_rails_env_variable_should_run_rake_command_in_env + 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' @@ -223,7 +223,7 @@ class ActionsTest < Rails::Generators::TestCase end end - def test_env_option_should_win_over_rails_env_variable_when_running_rake + test "env option should win over RAILS_ENV variable when running rake" do assert_called_with(generator, :run, ['rails log:clear RAILS_ENV=production', verbose: false]) do with_rails_env "staging" do action :rake, 'log:clear', env: 'production' @@ -231,7 +231,7 @@ class ActionsTest < Rails::Generators::TestCase end end - def test_rake_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 @@ class ActionsTest < Rails::Generators::TestCase 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 @@ class ActionsTest < Rails::Generators::TestCase 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 @@ class ActionsTest < Rails::Generators::TestCase 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 |