diff options
Diffstat (limited to 'railties/test/plugins/framework_extension_test.rb')
-rw-r--r-- | railties/test/plugins/framework_extension_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/railties/test/plugins/framework_extension_test.rb b/railties/test/plugins/framework_extension_test.rb index 87e19cadce..5e4ecf30dd 100644 --- a/railties/test/plugins/framework_extension_test.rb +++ b/railties/test/plugins/framework_extension_test.rb @@ -5,6 +5,33 @@ module PluginsTest def setup build_app boot_rails + require "rails" + end + + test "rake_tasks block is executed when MyApp.load_tasks is called" do + $ran_block = false + + class MyPlugin < Rails::Plugin + rake_tasks do + $ran_block = true + end + end + + require "#{app_path}/config/environment" + + assert !$ran_block + require 'rake' + require 'rake/testtask' + require 'rake/rdoctask' + AppTemplate::Application.load_tasks + assert $ran_block + end + end + + class ActiveRecordExtensionTest < Test::Unit::TestCase + def setup + build_app + boot_rails end test "active_record extensions are applied to ActiveRecord" do |