aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/plugin_loader_test.rb
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2009-02-22 10:39:56 -0600
committerJoshua Peek <josh@joshpeek.com>2009-02-22 10:39:56 -0600
commit441e4e22352c8805a882f6a661ab3982dd7eda12 (patch)
treedfd135c9c4012724282fe8c2466dfb5bdc9d95d7 /railties/test/plugin_loader_test.rb
parentff1afbd65098643a06eef928f92fecf6e9d548b2 (diff)
downloadrails-441e4e22352c8805a882f6a661ab3982dd7eda12.tar.gz
rails-441e4e22352c8805a882f6a661ab3982dd7eda12.tar.bz2
rails-441e4e22352c8805a882f6a661ab3982dd7eda12.zip
load plugin view_paths to action_mailer view_paths and make action_mailer use them [#2031 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'railties/test/plugin_loader_test.rb')
-rw-r--r--railties/test/plugin_loader_test.rb7
1 files changed, 5 insertions, 2 deletions
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]