1 require File.dirname(__FILE__) + '/abstract_unit'
4 class ActionViewTests < Test::Unit::TestCase
5 def test_find_template_extension_from_first_render
6 base = ActionView::Base.new
8 assert_nil base.send(:find_template_extension_from_first_render)
16 'foo.bar.rb' => 'bar.rb',
18 'baz/foo.bar.rb' => 'bar.rb',
19 'baz/foo.o/foo.rb' => 'rb',
20 'baz/foo.o/foo.bar.rb' => 'bar.rb',
21 }.each do |input,expectation|
22 base.instance_variable_set('@first_render', input)
23 assert_equal expectation, base.send(:find_template_extension_from_first_render)