Permalink
Browse files

don't encode an UTF-8 encoded template

  • Loading branch information...
1 parent 9d6e52b commit 10304a228d2b31a52c3e2e0efd83190f4d1d5e28 @cqpx cqpx committed Dec 20, 2011
@@ -94,7 +94,7 @@ def source_extract(indentation = 0)
"#{indent}#{line_counter}: #{line}\n"
end
- extract.encode! if extract.respond_to?(:encode!)
+ extract.force_encoding("UTF-8") if extract.respond_to?(:encode!)
extract
end
@@ -99,7 +99,7 @@ def index
app_file 'app/views/foo/index.html.erb', <<-ERB
<% raise 'boooom' %>
-
+測試テスト시험
ERB
app_file 'config/routes.rb', <<-RUBY
@@ -110,6 +110,7 @@ def index
post '/foo', :utf8 => ''
assert_match(/boooom/, last_response.body)
+ assert_match(/測試テスト시험/, last_response.body)
end
end
end

0 comments on commit 10304a2

Please sign in to comment.