diff options
author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2019-01-31 07:19:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-31 07:19:22 +0900 |
commit | 6729cef7516207efa1980de65fb4e1c72b4376d1 (patch) | |
tree | c7d073ffb0f7cabbb1aca6c10812af7c7f77bfb4 /railties/test/generators | |
parent | 535a8b995700a5875a898691b19b88969c22d264 (diff) | |
parent | 82e986670389aef7a61c860bacd347c60ff0b25c (diff) | |
download | rails-6729cef7516207efa1980de65fb4e1c72b4376d1.tar.gz rails-6729cef7516207efa1980de65fb4e1c72b4376d1.tar.bz2 rails-6729cef7516207efa1980de65fb4e1c72b4376d1.zip |
Merge pull request #34980 from y-yagi/fixes_34979
Don't add `RAILS_ENV` in generate action
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/actions_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 4932100ea2..44d4e92256 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -320,6 +320,12 @@ class ActionsTest < Rails::Generators::TestCase assert_no_file "app/models/my_model.rb" end + def test_generate_should_run_command_without_env + assert_called_with(generator, :run, ["rails generate model MyModel name:string", verbose: false]) do + action :generate, "model", "MyModel", "name:string" + end + end + def test_rake_should_run_rake_command_with_default_env assert_called_with(generator, :run, ["rake log:clear RAILS_ENV=development", verbose: false]) do with_rails_env nil do |