Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix has_migrations? check in Rails::Engine

(cherry picked from commit a7a58af)
  • Loading branch information...
commit 55d93f32218fc3e26c5b835260de3e6d9432d85e 1 parent 986e193
@spohlenz spohlenz authored
View
2  railties/lib/rails/engine.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)
View
9 railties/test/railties/shared_tests.rb
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.