Skip active record properly in 'plugin new' generator
This commit is contained in:
parent
57fae9b2c7
commit
b6497d3b5a
|
@ -6,7 +6,7 @@ require "rails/test_help"
|
|||
|
||||
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 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue