Permalink
Browse files

Merge pull request #2811 from avakhov/fix-environment-generator-action

fix indent for generator environment method
  • Loading branch information...
2 parents 6f3c699 + e61d6af commit 36f1612c34577225d1f71c368e70c234d5197707 @josevalim josevalim committed Sep 2, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 railties/lib/rails/generators/actions.rb
  2. +1 −1 railties/test/generators/actions_test.rb
@@ -97,7 +97,7 @@ def environment(data=nil, options={}, &block)
in_root do
if options[:env].nil?
- inject_into_file 'config/application.rb', "\n #{data}", :after => sentinel, :verbose => false
+ inject_into_file 'config/application.rb', "\n #{data}", :after => sentinel, :verbose => false
else
Array.wrap(options[:env]).each do |env|
inject_into_file "config/environments/#{env}.rb", "\n #{data}", :after => env_file_sentinel, :verbose => false
@@ -106,7 +106,7 @@ def test_environment_should_include_data_in_environment_initializer_block
run_generator
autoload_paths = 'config.autoload_paths += %w["#{Rails.root}/app/extras"]'
action :environment, autoload_paths
- assert_file 'config/application.rb', /#{Regexp.escape(autoload_paths)}/
+ assert_file 'config/application.rb', / class Application < Rails::Application\n #{Regexp.escape(autoload_paths)}/
end
def test_environment_should_include_data_in_environment_initializer_block_with_env_option

0 comments on commit 36f1612

Please sign in to comment.