diff options
author | Carl Lerche <carllerche@mac.com> | 2009-12-31 13:11:54 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-12-31 13:12:52 -0800 |
commit | ae7ada1fde1648a5c81b9e6adf74d515e0bbe0a5 (patch) | |
tree | 385b3655a8b8ef5355e4c85f7af81edfab5ef777 /railties/test | |
parent | e749424dfa38a0300a621b772eae96f9cc5d2555 (diff) | |
download | rails-ae7ada1fde1648a5c81b9e6adf74d515e0bbe0a5.tar.gz rails-ae7ada1fde1648a5c81b9e6adf74d515e0bbe0a5.tar.bz2 rails-ae7ada1fde1648a5c81b9e6adf74d515e0bbe0a5.zip |
Some railties cleanup:
* Rename <framework>/rails.rb -> <framework>/railtie.rb
* Rails::Plugin -> Rails::Railtie
* Rails::Plugin::Vendored -> Rails::Plugin
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 1 | ||||
-rw-r--r-- | railties/test/application/initializer_test.rb | 2 | ||||
-rw-r--r-- | railties/test/application/notifications_test.rb | 1 | ||||
-rw-r--r-- | railties/test/initializer/path_test.rb | 2 | ||||
-rw-r--r-- | railties/test/plugins/configuration_test.rb | 8 | ||||
-rw-r--r-- | railties/test/plugins/framework_extension_test.rb | 4 |
6 files changed, 12 insertions, 6 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 1f04eb9f75..adb867ca6d 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -16,6 +16,7 @@ module ApplicationTests FileUtils.rm_rf(new_app) if File.directory?(new_app) build_app boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") end test "the application root is set correctly" do diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb index e03f9ffb00..3fd0b0e5df 100644 --- a/railties/test/application/initializer_test.rb +++ b/railties/test/application/initializer_test.rb @@ -7,6 +7,7 @@ module ApplicationTests def setup build_app boot_rails + FileUtils.rm_rf "#{app_path}/config/environments" end test "initializing an application adds the application paths to the load path" do @@ -160,6 +161,7 @@ module ApplicationTests def setup build_app boot_rails + FileUtils.rm_rf "#{app_path}/config/environments" end test "database middleware doesn't initialize when activerecord is not in frameworks" do diff --git a/railties/test/application/notifications_test.rb b/railties/test/application/notifications_test.rb index 8229e83147..b57e829cca 100644 --- a/railties/test/application/notifications_test.rb +++ b/railties/test/application/notifications_test.rb @@ -18,6 +18,7 @@ module ApplicationTests def setup build_app boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") require "active_support/notifications" @events = [] diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 26663d0f47..bfb1887d11 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -7,6 +7,7 @@ module InitializerTests def setup build_app boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") add_to_config <<-RUBY config.root = "#{app_path}" config.after_initialize do @@ -14,7 +15,6 @@ module InitializerTests end RUBY use_frameworks [:action_controller, :action_view, :action_mailer, :active_record] - require "rails/all" require "#{app_path}/config/environment" @paths = Rails.application.config.paths end diff --git a/railties/test/plugins/configuration_test.rb b/railties/test/plugins/configuration_test.rb index 9616d1b2d0..25bf24eb3b 100644 --- a/railties/test/plugins/configuration_test.rb +++ b/railties/test/plugins/configuration_test.rb @@ -9,23 +9,23 @@ module PluginsTest end test "config is available to plugins" do - class Foo < Rails::Plugin ; end + class Foo < Rails::Railtie ; end assert_nil Foo.config.action_controller.foo end test "a config name is available for the plugin" do - class Foo < Rails::Plugin ; config.foo.greetings = "hello" ; end + class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end assert_equal "hello", Foo.config.foo.greetings end test "plugin configurations are available in the application" do - class Foo < Rails::Plugin ; config.foo.greetings = "hello" ; end + class Foo < Rails::Railtie ; config.foo.greetings = "hello" ; end require "#{app_path}/config/application" assert_equal "hello", AppTemplate::Application.config.foo.greetings end test "plugin config merges are deep" do - class Foo < Rails::Plugin ; config.foo.greetings = 'hello' ; end + class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end class MyApp < Rails::Application config.foo.bar = "bar" end diff --git a/railties/test/plugins/framework_extension_test.rb b/railties/test/plugins/framework_extension_test.rb index 86e5cebfcd..c920db77aa 100644 --- a/railties/test/plugins/framework_extension_test.rb +++ b/railties/test/plugins/framework_extension_test.rb @@ -7,13 +7,14 @@ module PluginsTest 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 MyPlugin < Rails::Plugin + class MyTie < Rails::Railtie rake_tasks do $ran_block = true end @@ -37,6 +38,7 @@ module PluginsTest def setup build_app boot_rails + FileUtils.rm_rf("#{app_path}/config/environments") end test "active_record extensions are applied to ActiveRecord" do |