Permalink
Browse files

Merge pull request #1946 from spohlenz/fix-engine-migrations-check-3-1

Fix engine migrations check
  • Loading branch information...
2 parents 986e193 + 55d93f3 commit 108210cffe9f0fc5f092afeffaa772b7a4471799 @josevalim josevalim committed Jul 3, 2011
Showing with 10 additions and 1 deletion.
  1. +1 −1 railties/lib/rails/engine.rb
  2. +9 −0 railties/test/railties/shared_tests.rb
@@ -579,7 +579,7 @@ def routes?
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 @@ class CreateYaffles < ActiveRecord::Migration
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"

0 comments on commit 108210c

Please sign in to comment.