diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-10-11 10:08:10 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-11-06 21:29:23 +0000 |
commit | f4af77ab5d6f5bd3b045f676978bc2a4677cee38 (patch) | |
tree | 2cce309feb91515d7fc2056a476f8019efd22bd6 /railties/test | |
parent | 0835527d6bb970cedd33633503506e41156ab780 (diff) | |
download | rails-f4af77ab5d6f5bd3b045f676978bc2a4677cee38.tar.gz rails-f4af77ab5d6f5bd3b045f676978bc2a4677cee38.tar.bz2 rails-f4af77ab5d6f5bd3b045f676978bc2a4677cee38.zip |
Rails::Generators::Actions#execute_command allows option `capture`
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/actions_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 3ecfb4edd9..f421207025 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -308,6 +308,14 @@ class ActionsTest < Rails::Generators::TestCase end end + test "rake command with capture option should run rake command with capture" do + assert_called_with(generator, :run, ["rake log:clear RAILS_ENV=development", verbose: false, capture: true]) do + with_rails_env nil do + action :rake, "log:clear", capture: true + end + end + end + 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 @@ -346,6 +354,14 @@ class ActionsTest < Rails::Generators::TestCase end end + test "rails command with capture option should run rails_command with capture" do + assert_called_with(generator, :run, ["rails log:clear RAILS_ENV=development", verbose: false, capture: true]) do + with_rails_env nil do + action :rails_command, "log:clear", capture: true + end + end + end + def test_capify_should_run_the_capify_command content = capture(:stderr) do assert_called_with(generator, :run, ["capify .", verbose: false]) do |