aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/actions_test.rb
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2011-07-17 01:47:21 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2011-07-18 10:43:25 -0500
commitfcdcc87a0890158046a2358f0a668a5157c38b3d (patch)
tree311e3ffa664cc99d61894692c788f69e6235dbbb /railties/test/generators/actions_test.rb
parent0aec2e7191b8845fda9a2bbe3d76c6a9dc22401b (diff)
downloadrails-fcdcc87a0890158046a2358f0a668a5157c38b3d.tar.gz
rails-fcdcc87a0890158046a2358f0a668a5157c38b3d.tar.bz2
rails-fcdcc87a0890158046a2358f0a668a5157c38b3d.zip
Fix Rails::Generators::Actions#environment when env is passed. Closes #2110
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r--railties/test/generators/actions_test.rb7
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