diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-26 09:36:13 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-26 09:36:13 +0200 |
commit | e461e1bc0ec0a5c365840031309b83143e12955a (patch) | |
tree | 11c2d270ec0fcd5de79d460b095161c073791cde /railties/test | |
parent | c9132c149cb9fe5628c2e947434e8c58acdaa709 (diff) | |
download | rails-e461e1bc0ec0a5c365840031309b83143e12955a.tar.gz rails-e461e1bc0ec0a5c365840031309b83143e12955a.tar.bz2 rails-e461e1bc0ec0a5c365840031309b83143e12955a.zip |
Ensure application rake tasks and generators are loaded after the ones specified in railties/engines/rails. [#4471 state:resolved]
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/rake_test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb new file mode 100644 index 0000000000..bf2da866f4 --- /dev/null +++ b/railties/test/application/rake_test.rb @@ -0,0 +1,23 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class RakeTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") + end + + def test_gems_tasks_are_loaded_first_than_application_ones + app_file "lib/tasks/app.rake", <<-RUBY + $task_loaded = Rake::Task.task_defined?("db:create:all") + RUBY + + require "#{app_path}/config/environment" + ::Rails.application.load_tasks + assert $task_loaded + end + end +end
\ No newline at end of file |