Skip to content
Browse files

When skipping skip active record, mark config.generators.orm to false…

…; LH 5796 remainder
  • Loading branch information...
1 parent be9857c commit 75e1e2175d81b7047145768e72a0541b3266abed @theif theif committed May 6, 2011
View
2 railties/lib/rails/generators/rails/app/templates/config/application.rb
@@ -63,6 +63,8 @@ class Application < Rails::Application
<% unless options[:skip_active_record] -%>
# Enable IdentityMap for Active Record, to disable set to false or remove the line below.
config.active_record.identity_map = true
+<% else -%>
+ config.generators.orm = false
<% end -%>
# Enable the asset pipeline
View
5 railties/test/generators/app_generator_test.rb
@@ -161,7 +161,10 @@ def test_generator_if_skip_active_record_is_given
def test_active_record_is_removed_from_frameworks_if_skip_active_record_is_given
run_generator [destination_root, "--skip-active-record"]
- assert_file "config/application.rb", /#\s+require\s+["']active_record\/railtie["']/
+ assert_file "config/application.rb" do |file|
+ assert_match /#\s+require\s+["']active_record\/railtie["']/, file
+ assert_match /config.generators.orm = false/, file
+ end
end
def test_creation_of_a_test_directory

0 comments on commit 75e1e21

Please sign in to comment.
Something went wrong with that request. Please try again.