diff options
Diffstat (limited to 'railties/test/plugins')
-rw-r--r-- | railties/test/plugins/configuration_test.rb | 8 | ||||
-rw-r--r-- | railties/test/plugins/framework_extension_test.rb | 4 |
2 files changed, 7 insertions, 5 deletions
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 |