Permalink
Browse files

Skip active record properly in 'plugin new' generator

  • Loading branch information...
1 parent 57fae9b commit b6497d3b5a84ca5e7e15700419ddf44c096c57a2 @drogus drogus committed Nov 2, 2010
@@ -6,7 +6,7 @@
Rails.backtrace_cleaner.remove_silencers!
-<% if full? -%>
+<% if full? && !options[:skip_active_record] -%>
# Run any available migration from application
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
# and from engine
@@ -59,6 +59,7 @@ def test_ensure_that_plugin_options_are_not_passed_to_app_generator
def test_ensure_that_skip_active_record_option_is_passed_to_app_generator
run_generator [destination_root, "--skip_active_record"]
assert_no_file "test/dummy/config/database.yml"
+ assert_no_match /ActiveRecord/, File.read(File.join(destination_root, "test/test_helper.rb"))
end
def test_ensure_that_database_option_is_passed_to_app_generator

0 comments on commit b6497d3

Please sign in to comment.