diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-25 23:17:39 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-25 23:17:39 +0100 |
commit | cc1bb8590e6021e0c86b345857358704fa68c9eb (patch) | |
tree | 1eaacb37a53146aa83b57cc20d7d0791065d621c /railties/test/plugins/framework_extension_test.rb | |
parent | 02908e11425069e5b91cbf8ec3c8344a58493ef8 (diff) | |
download | rails-cc1bb8590e6021e0c86b345857358704fa68c9eb.tar.gz rails-cc1bb8590e6021e0c86b345857358704fa68c9eb.tar.bz2 rails-cc1bb8590e6021e0c86b345857358704fa68c9eb.zip |
Refactor some railties tests structure.
Diffstat (limited to 'railties/test/plugins/framework_extension_test.rb')
-rw-r--r-- | railties/test/plugins/framework_extension_test.rb | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/railties/test/plugins/framework_extension_test.rb b/railties/test/plugins/framework_extension_test.rb deleted file mode 100644 index d57fd4e635..0000000000 --- a/railties/test/plugins/framework_extension_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require "isolation/abstract_unit" - -module PluginsTest - class FrameworkExtensionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - require "rails/all" - end - - test "rake_tasks block is executed when MyApp.load_tasks is called" do - $ran_block = false - - class MyTie < Rails::Railtie - 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 - - test "generators block is executed when MyApp.load_generators is called" do - $ran_block = false - - class MyTie < Rails::Railtie - generators do - $ran_block = true - end - end - - require "#{app_path}/config/environment" - - assert !$ran_block - AppTemplate::Application.load_generators - assert $ran_block - end - end - - class ActiveRecordExtensionTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - FileUtils.rm_rf("#{app_path}/config/environments") - end - - test "active_record extensions are applied to ActiveRecord" do - add_to_config "config.active_record.table_name_prefix = 'tbl_'" - - require "#{app_path}/config/environment" - - assert_equal 'tbl_', ActiveRecord::Base.table_name_prefix - end - end -end
\ No newline at end of file |