aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-27 18:56:31 +0100
committerCarl Lerche <carllerche@mac.com>2010-01-28 10:28:41 -0800
commit64ea3dfd9f14b09b65905a10379050ba2f42d8b8 (patch)
tree5e9c621ae0299a85b641234618c094a1e3964ff0 /railties/test
parentd3d487479a6d4a5ba6977fb0075e7937eb19718a (diff)
downloadrails-64ea3dfd9f14b09b65905a10379050ba2f42d8b8.tar.gz
rails-64ea3dfd9f14b09b65905a10379050ba2f42d8b8.tar.bz2
rails-64ea3dfd9f14b09b65905a10379050ba2f42d8b8.zip
Add reloadable specific for engines and move environment to application paths.
Signed-off-by: Carl Lerche <carllerche@mac.com>
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/railties/configuration_test.rb6
-rw-r--r--railties/test/railties/engine_test.rb4
-rw-r--r--railties/test/railties/plugin_test.rb4
-rw-r--r--railties/test/railties/shared_tests.rb2
4 files changed, 12 insertions, 4 deletions
diff --git a/railties/test/railties/configuration_test.rb b/railties/test/railties/configuration_test.rb
index c5ff6dad9c..17ea526bbf 100644
--- a/railties/test/railties/configuration_test.rb
+++ b/railties/test/railties/configuration_test.rb
@@ -18,13 +18,13 @@ module RailtiesTest
assert_equal "hello", Foo.config.foo.greetings
end
- test "plugin configurations are available in the application" do
+ test "railtie configurations are available in the application" do
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
+ test "railtie config merges are deep" do
class Foo < Rails::Railtie ; config.foo.greetings = 'hello' ; end
class Bar < Rails::Railtie
config.foo.bar = "bar"
@@ -33,7 +33,7 @@ module RailtiesTest
assert_equal "bar", Bar.config.foo.bar
end
- test "plugin can add subscribers" do
+ test "railtie can add subscribers" do
begin
class Foo < Rails::Railtie; subscriber(Rails::Subscriber.new); end
assert_kind_of Rails::Subscriber, Rails::Subscriber.subscribers[:foo]
diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb
index 374f5ea93c..6f49ebcf1b 100644
--- a/railties/test/railties/engine_test.rb
+++ b/railties/test/railties/engine_test.rb
@@ -19,5 +19,9 @@ module RailtiesTest
plugin.write "lib/another.rb", "class Another; end"
end
end
+
+ def reload_config
+ :reload_engines
+ end
end
end
diff --git a/railties/test/railties/plugin_test.rb b/railties/test/railties/plugin_test.rb
index 0adc31e3ed..a29186f14a 100644
--- a/railties/test/railties/plugin_test.rb
+++ b/railties/test/railties/plugin_test.rb
@@ -15,6 +15,10 @@ module RailtiesTest
end
end
+ def reload_config
+ :reload_plugins
+ end
+
test "plugin can load the file with the same name in lib" do
boot_rails
require "bukkits"
diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb
index fc4a19e7e7..2483fa47fd 100644
--- a/railties/test/railties/shared_tests.rb
+++ b/railties/test/railties/shared_tests.rb
@@ -31,7 +31,7 @@ module RailtiesTest
def test_plugin_constants_get_reloaded_if_config_reload_plugins
add_to_config <<-RUBY
- config.reload_plugins = true
+ config.#{reload_config} = true
RUBY
boot_rails