mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #1945 from spohlenz/fix-engine-migrations-check
Fix has_migrations? check in Rails::Engine
This commit is contained in:
@@ -586,7 +586,7 @@ module Rails
|
||||
end
|
||||
|
||||
def has_migrations?
|
||||
paths["db/migrate"].first.present?
|
||||
paths["db/migrate"].existent.any?
|
||||
end
|
||||
|
||||
def find_root_with_flag(flag, default=nil)
|
||||
|
||||
@@ -84,6 +84,15 @@ module RailtiesTest
|
||||
end
|
||||
end
|
||||
|
||||
def test_no_rake_task_without_migrations
|
||||
boot_rails
|
||||
require 'rake'
|
||||
require 'rdoc/task'
|
||||
require 'rake/testtask'
|
||||
Rails.application.load_tasks
|
||||
assert !Rake::Task.task_defined?('bukkits:install:migrations')
|
||||
end
|
||||
|
||||
def test_puts_its_lib_directory_on_load_path
|
||||
boot_rails
|
||||
require "another"
|
||||
|
||||
Reference in New Issue
Block a user