Enabled frozen string literals (#1154)

* Enabled frozen string literals

* Update rubocop config

* Prefer string interpolation in simple cases

Co-Authored-By: Dylan Thacker-Smith <dylan.smith@shopify.com>
This commit is contained in:
Mike Angell
2019-09-18 13:19:45 +10:00
committed by GitHub
parent 1dcad34b06
commit 0d26f05bb8
121 changed files with 379 additions and 150 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class BlockUnitTest < Minitest::Test
@@ -61,7 +63,7 @@ class BlockUnitTest < Minitest::Test
assert_equal 'hello', template.render
buf = ''
buf = +''
output = template.render({}, output: buf)
assert_equal 'hello', output
assert_equal 'hello', buf
@@ -79,7 +81,7 @@ class BlockUnitTest < Minitest::Test
assert_equal 'foohellobar', template.render
buf = ''
buf = +''
output = template.render({}, output: buf)
assert_equal 'foohellobar', output
assert_equal 'foohellobar', buf

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class ConditionUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class HundredCentes

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class FileSystemUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class I18nUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class LexerUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class ParserUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class PartialCacheUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class RegexpUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class StrainerUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class TagUnitTest < Minitest::Test
@@ -31,7 +33,7 @@ class TagUnitTest < Minitest::Test
assert_equal 'hello', template.render
buf = ''
buf = +''
output = template.render({}, output: buf)
assert_equal 'hello', output
assert_equal 'hello', buf
@@ -49,7 +51,7 @@ class TagUnitTest < Minitest::Test
assert_equal 'foohellobar', template.render
buf = ''
buf = +''
output = template.render({}, output: buf)
assert_equal 'foohellobar', output
assert_equal 'foohellobar', buf

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class CaseTagUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class ForTagUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class IfTagUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class TemplateUnitTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class TokenizerTest < Minitest::Test

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'test_helper'
class VariableUnitTest < Minitest::Test