Permalink
Browse files

Test that render gets correct exact template name

  • Loading branch information...
1 parent bbd2cae commit a0e83d5af7385317fdcc91390e1b3a02b0cf56b8 @nertzy nertzy committed Mar 28, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/test/activerecord/render_partial_with_record_identification_test.rb
@@ -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

0 comments on commit a0e83d5

Please sign in to comment.