diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/template_finder_test.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/actionpack/test/template/template_finder_test.rb b/actionpack/test/template/template_finder_test.rb index 8640d22e02..296815f4cb 100644 --- a/actionpack/test/template/template_finder_test.rb +++ b/actionpack/test/template/template_finder_test.rb @@ -30,8 +30,8 @@ class TemplateFinderTest < Test::Unit::TestCase assert_equal Dir.glob("#{LOAD_PATH_ROOT}/**/*").find_all {|f| !File.directory?(f) }.size, ActionView::TemplateFinder.processed_view_paths[LOAD_PATH_ROOT].size end - - def test_find_template_extension_from_first_render + + def test_find_template_extension_from_first_render assert_nil @finder.send(:find_template_extension_from_first_render) { @@ -50,26 +50,23 @@ class TemplateFinderTest < Test::Unit::TestCase assert_equal expectation, @finder.send(:find_template_extension_from_first_render) end end - + def test_should_report_file_exists_correctly - assert_nil @finder.send(:find_template_extension_from_first_render) + assert_nil @finder.send(:find_template_extension_from_first_render) assert_equal false, @finder.send(:file_exists?, 'test.rhtml') assert_equal false, @finder.send(:file_exists?, 'test.rb') @template.instance_variable_set('@first_render', 'foo.rb') - - assert_equal 'rb', @finder.send(:find_template_extension_from_first_render) + + assert_equal 'rb', @finder.send(:find_template_extension_from_first_render) assert_equal false, @finder.send(:file_exists?, 'baz') assert_equal false, @finder.send(:file_exists?, 'baz.rb') end - - uses_mocha 'Template finder tests' do + uses_mocha 'Template finder tests' do def test_should_update_extension_cache_when_template_handler_is_registered ActionView::TemplateFinder.expects(:update_extension_cache_for).with("funky") ActionView::Template::register_template_handler :funky, Class.new(ActionView::TemplateHandler) end - end - end |