diff --git a/railties/lib/rails/commands/rake/rake_command.rb b/railties/lib/rails/commands/rake/rake_command.rb index 2a8a8e170f..6b0bce654a 100644 --- a/railties/lib/rails/commands/rake/rake_command.rb +++ b/railties/lib/rails/commands/rake/rake_command.rb @@ -16,7 +16,6 @@ module Rails require_rake Rake.with_application do |rake| - load "rails/tasks.rb" rake.init("rails", [task, *args]) rake.load_rakefile if Rails.respond_to?(:root) diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 48faf88818..9cb908d12f 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -25,6 +25,10 @@ module ApplicationTests assert $task_loaded end + test "framework tasks are evaluated only once" do + assert_equal ["Rails version"], rails("about").scan(/^Rails version/) + end + test "task backtrace is silenced" do add_to_config <<-RUBY rake_tasks do