diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-18 10:00:08 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-18 10:00:08 -0700 |
commit | 8efc0f1f340ef50362b87d428ebff85a2f66cb16 (patch) | |
tree | 312d09c04c2fed26820602730a79b2a2edb8171b /railties/test/generators | |
parent | da144894e958770c84692065ec260aea2853afe9 (diff) | |
parent | fcdcc87a0890158046a2358f0a668a5157c38b3d (diff) | |
download | rails-8efc0f1f340ef50362b87d428ebff85a2f66cb16.tar.gz rails-8efc0f1f340ef50362b87d428ebff85a2f66cb16.tar.bz2 rails-8efc0f1f340ef50362b87d428ebff85a2f66cb16.zip |
Merge pull request #2116 from guilleiguaran/fix-environment-generator-action
Fix Rails::Generators::Actions#environment when env is passed
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/actions_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 597746c4aa..e4a8000425 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -109,6 +109,13 @@ class ActionsTest < Rails::Generators::TestCase assert_file 'config/application.rb', /#{Regexp.escape(autoload_paths)}/ end + def test_environment_should_include_data_in_environment_initializer_block_with_env_option + run_generator + autoload_paths = 'config.autoload_paths += %w["#{Rails.root}/app/extras"]' + action :environment, autoload_paths, :env => 'development' + assert_file "config/environments/development.rb", /Application\.configure do\n #{Regexp.escape(autoload_paths)}/ + end + def test_environment_with_block_should_include_block_contents_in_environment_initializer_block run_generator |