开发者

How to disable RSpec2 UTF-8 and HTML characters escaping?

开发者 https://www.devze.com 2023-02-05 12:52 出处:网络
WIth ruby 1.8.7 and rails 3.0.3 on Mac OS I always got \"&#...;\" characters in ERB template output running rspec 2.4 controllers tests (with integrate_views).

WIth ruby 1.8.7 and rails 3.0.3 on Mac OS I always got "&#...;" characters in ERB template output running rspec 2.4 controllers tests (with integrate_views).

Besides "&" character and Cyrillic characters are always escaped, even using <%= raw '...' 开发者_StackOverflow社区or html_safe methods.

Can anybody give a clue - what's going on here?


You mean console/terminal output?

Try editing you ~/.profile file and pasting this line:

export LANG=sr_YU.UTF-8

You can find listing of all available locales here. Replace sr_YU with your own cyrillic locale.

0

精彩评论

暂无评论...
验证码 换一张
取 消