aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/initializer_test.rb5
-rw-r--r--railties/test/plugin_loader_test.rb7
2 files changed, 8 insertions, 4 deletions
diff --git a/railties/test/initializer_test.rb b/railties/test/initializer_test.rb
index 2ab4101eaf..eb9ec750da 100644
--- a/railties/test/initializer_test.rb
+++ b/railties/test/initializer_test.rb
@@ -182,6 +182,7 @@ require File.dirname(__FILE__) + '/plugin_test_helper'
class InitializerPluginLoadingTests < Test::Unit::TestCase
def setup
@configuration = Rails::Configuration.new
+ @configuration.frameworks -= [:action_mailer]
@configuration.plugin_paths << plugin_fixture_root_path
@initializer = Rails::Initializer.new(@configuration)
@valid_plugin_path = plugin_fixture_path('default/stubby')
@@ -310,8 +311,8 @@ class InitializerSetupI18nTests < Test::Unit::TestCase
Rails::Initializer.run(:initialize_i18n, config)
assert_equal [
- File.expand_path("./test/../../activesupport/lib/active_support/locale/en.yml"),
- File.expand_path("./test/../../actionpack/lib/action_view/locale/en.yml"),
+ File.expand_path(File.dirname(__FILE__) + "/../../activesupport/lib/active_support/locale/en.yml"),
+ File.expand_path(File.dirname(__FILE__) + "/../../actionpack/lib/action_view/locale/en.yml"),
"my/test/locale.yml",
"my/other/locale.yml" ], I18n.load_path.collect { |path| path =~ /^\./ ? File.expand_path(path) : path }
end
diff --git a/railties/test/plugin_loader_test.rb b/railties/test/plugin_loader_test.rb
index 23b81ddbf6..e802b1ace7 100644
--- a/railties/test/plugin_loader_test.rb
+++ b/railties/test/plugin_loader_test.rb
@@ -1,7 +1,9 @@
require 'plugin_test_helper'
$:.unshift File.dirname(__FILE__) + "/../../actionpack/lib"
+$:.unshift File.dirname(__FILE__) + "/../../actionmailer/lib"
require 'action_controller'
+require 'action_mailer'
# Mocks out the configuration
module Rails
@@ -125,14 +127,15 @@ class TestPluginLoader < Test::Unit::TestCase
end
end
- def test_engine_controllers_should_have_their_view_path_set_when_loaded
+ def test_engine_controllers_and_action_mailers_should_have_their_view_path_set_when_loaded
only_load_the_following_plugins!([ :engine ])
@loader.send :add_engine_view_paths
assert_equal [ File.join(plugin_fixture_path('engines/engine'), 'app', 'views') ], ActionController::Base.view_paths
+ assert_equal [ File.join(plugin_fixture_path('engines/engine'), 'app', 'views') ], ActionMailer::Base.view_paths
end
-
+
def test_should_add_plugin_load_paths_to_Dependencies_load_once_paths
only_load_the_following_plugins! [:stubby, :acts_as_chunky_bacon]