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:
parent
bb1ecdcc67
commit
11eaf1c1dd
1 changed files with 4 additions and 2 deletions
|
@ -80,7 +80,7 @@ class TestERBTemplate < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
|
@ -189,7 +189,9 @@ class TestERBTemplate < ActiveSupport::TestCase
|
|||
@template = new_template("hello \xFCmlat", virtual_path: nil)
|
||||
render
|
||||
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
|
||||
|
||||
def with_external_encoding(encoding)
|
||||
|
|
Loading…
Reference in a new issue