1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Test that render gets correct exact template name

This commit is contained in:
Grant Hutchins 2012-03-27 21:05:42 -04:00
parent bbd2caeaf9
commit a0e83d5af7

View file

@ -130,13 +130,13 @@ class RenderPartialWithRecordIdentificationAndNestedControllersTest < ActiveReco
def test_render_with_record_in_nested_controller
get :render_with_record_in_nested_controller
assert_template 'fun/games/_game'
assert_template %r{\Afun/games/_game\Z}
assert_equal 'Pong', @response.body
end
def test_render_with_record_collection_in_nested_controller
get :render_with_record_collection_in_nested_controller
assert_template 'fun/games/_game'
assert_template %r{\Afun/games/_game\Z}
assert_equal 'PongTank', @response.body
end
end
@ -146,13 +146,13 @@ class RenderPartialWithRecordIdentificationAndNestedDeeperControllersTest < Acti
def test_render_with_record_in_deeper_nested_controller
get :render_with_record_in_deeper_nested_controller
assert_template 'fun/serious/games/_game'
assert_template %r{\Afun/serious/games/_game\Z}
assert_equal 'Chess', @response.body
end
def test_render_with_record_collection_in_deeper_nested_controller
get :render_with_record_collection_in_deeper_nested_controller
assert_template 'fun/serious/games/_game'
assert_template %r{\Afun/serious/games/_game\Z}
assert_equal 'ChessSudokuSolitaire', @response.body
end
end