Commit fdac7614e53402191ee60357534d6f772c60a20d
Exists in
staging
and in
4 other branches
Merge branch 'I13-fix_partial_for_class' into stable
Showing
1 changed file
with
14 additions
and
0 deletions
Show diff stats
test/unit/application_helper_test.rb
... | ... | @@ -49,6 +49,20 @@ class ApplicationHelperTest < ActionView::TestCase |
49 | 49 | end |
50 | 50 | end |
51 | 51 | |
52 | + should 'plugins path take precedence over core path' do | |
53 | + core_path = 'core/' | |
54 | + plugin_path = 'path/' | |
55 | + @controller = mock() | |
56 | + @controller.stubs(:view_paths).returns([plugin_path, core_path]) | |
57 | + self.stubs(:params).returns({:controller => 'test'}) | |
58 | + | |
59 | + File.stubs(:exists?).returns(false) | |
60 | + File.stubs(:exists?).with(core_path+"test/_block.html.erb").returns(true) | |
61 | + File.stubs(:exists?).with(plugin_path+"test/_raw_html_block.html.erb").returns(true) | |
62 | + | |
63 | + assert_equal 'raw_html_block', partial_for_class(RawHTMLBlock) | |
64 | + end | |
65 | + | |
52 | 66 | should 'generate link to stylesheet' do |
53 | 67 | File.stubs(:exists?).returns(false) |
54 | 68 | File.expects(:exists?).with(Rails.root.join('public', 'stylesheets', 'something.css')).returns(true) | ... | ... |