Skip to content

Commit

Permalink
fix test data, should specify encoding to use multibyte chars on Ruby…
Browse files Browse the repository at this point in the history
… 1.9

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
moro authored and jeremy committed Feb 21, 2009
1 parent 99341a2 commit faf7986
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions actionpack/test/controller/routing_test.rb
Expand Up @@ -1149,6 +1149,7 @@ def test_route_with_text_default
assert_equal({:controller => "content", :action => 'show_page', :id => 'foo'}, rs.recognize_path("/page/foo"))

token = "\321\202\320\265\320\272\321\201\321\202" # 'text' in russian
token.force_encoding("UTF-8") if token.respond_to?(:force_encoding)
escaped_token = CGI::escape(token)

assert_equal '/page/' + escaped_token, rs.generate(:controller => 'content', :action => 'show_page', :id => token)
Expand Down

0 comments on commit faf7986

Please sign in to comment.