Skip to content

Commit

Permalink
Test that render gets correct exact template name
Browse files Browse the repository at this point in the history
  • Loading branch information
nertzy committed Mar 28, 2012
1 parent bbd2cae commit a0e83d5
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -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
Expand All @@ -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

0 comments on commit a0e83d5

Please sign in to comment.