mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix has_migrations? check in Rails::Engine
This commit is contained in:
parent
9d6e5e64dc
commit
a7a58af244
2 changed files with 10 additions and 1 deletions
|
@ -586,7 +586,7 @@ module Rails
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_migrations?
|
def has_migrations?
|
||||||
paths["db/migrate"].first.present?
|
paths["db/migrate"].existent.any?
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_root_with_flag(flag, default=nil)
|
def find_root_with_flag(flag, default=nil)
|
||||||
|
|
|
@ -84,6 +84,15 @@ module RailtiesTest
|
||||||
end
|
end
|
||||||
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
|
def test_puts_its_lib_directory_on_load_path
|
||||||
boot_rails
|
boot_rails
|
||||||
require "another"
|
require "another"
|
||||||
|
|
Loading…
Reference in a new issue