mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #2811 from avakhov/fix-environment-generator-action
fix indent for generator environment method
This commit is contained in:
commit
36f1612c34
2 changed files with 2 additions and 2 deletions
|
@ -97,7 +97,7 @@ module Rails
|
|||
|
||||
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 @@ class ActionsTest < Rails::Generators::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue