Skip to content

Commit

Permalink
Remove modification of string literals in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed May 22, 2024
1 parent b008ed8 commit e6f8b7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/tilt_template_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def default_encoding

it "using provided template data verbatim when given as string" do
with_default_encoding('Big5') do
inst = _MockTemplate.new(@template) { "blah".force_encoding('GBK') }
inst = _MockTemplate.new(@template) { "blah".dup.force_encoding('GBK') }
assert_equal 'GBK', inst.data.encoding.to_s
end
end
Expand Down Expand Up @@ -525,7 +525,7 @@ def default_encoding
end

it "uses #default_encoding instead of current encoding" do
tmpl = "".force_encoding('Big5')
tmpl = "".dup.force_encoding('Big5')
inst = _UTF8Template.new(@template) { tmpl }
assert_equal 'UTF-8', inst.data.encoding.to_s
end
Expand Down

0 comments on commit e6f8b7f

Please sign in to comment.