1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix RuboCop errors re \xFC

This commit is contained in:
Xavier Noria 2016-09-02 00:04:27 +02:00
parent bb1ecdcc67
commit 11eaf1c1dd

View file

@ -80,7 +80,7 @@ class TestERBTemplate < ActiveSupport::TestCase
end end
def test_raw_template def test_raw_template
@template = new_template("<%= hello %>", :handler => ActionView::Template::Handlers::Raw.new) @template = new_template("<%= hello %>", handler: ActionView::Template::Handlers::Raw.new)
assert_equal "<%= hello %>", render assert_equal "<%= hello %>", render
end end
@ -189,7 +189,9 @@ class TestERBTemplate < ActiveSupport::TestCase
@template = new_template("hello \xFCmlat", virtual_path: nil) @template = new_template("hello \xFCmlat", virtual_path: nil)
render render
end end
assert_match(/\xFC/, e.message) # Hack: We write the regexp this way because the parser of RuboCop
# errs with /\xFC/.
assert_match(Regexp.new("\xFC"), e.message)
end end
def with_external_encoding(encoding) def with_external_encoding(encoding)