diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-02-14 12:11:39 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 12:11:39 -0300 |
commit | 208fe3690d840d0ee65b1395a891886e58fd3f4b (patch) | |
tree | 861da096e3d26abcb17c82b4d9a8c76d5ba9a1a3 /test | |
parent | d6af2090b16f7d061aa43913d610c6fada58b7e2 (diff) | |
parent | c2bc569d2d538584cfc081e5775de17cdf2f054b (diff) | |
download | rails-208fe3690d840d0ee65b1395a891886e58fd3f4b.tar.gz rails-208fe3690d840d0ee65b1395a891886e58fd3f4b.tar.bz2 rails-208fe3690d840d0ee65b1395a891886e58fd3f4b.zip |
Merge pull request #471 from rails/frozen-string-literal
Enable frozen_string_literal in all files in arel
Diffstat (limited to 'test')
58 files changed, 58 insertions, 0 deletions
diff --git a/test/attributes/test_attribute.rb b/test/attributes/test_attribute.rb index 928b23ed7b..2b971ce54a 100644 --- a/test/attributes/test_attribute.rb +++ b/test/attributes/test_attribute.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'ostruct' diff --git a/test/collectors/test_bind_collector.rb b/test/collectors/test_bind_collector.rb index fc7df2fc45..877aa20043 100644 --- a/test/collectors/test_bind_collector.rb +++ b/test/collectors/test_bind_collector.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'arel/collectors/bind' diff --git a/test/collectors/test_sql_string.rb b/test/collectors/test_sql_string.rb index 37a9e41f71..92f1bf0fba 100644 --- a/test/collectors/test_sql_string.rb +++ b/test/collectors/test_sql_string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'arel/collectors/bind' diff --git a/test/helper.rb b/test/helper.rb index 6e8ac836fc..022ba1dae6 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rubygems' require 'minitest/autorun' require 'fileutils' diff --git a/test/nodes/test_and.rb b/test/nodes/test_and.rb index 88d6d61531..8d1980269c 100644 --- a/test/nodes/test_and.rb +++ b/test/nodes/test_and.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_as.rb b/test/nodes/test_as.rb index b1dcccf7c7..1240d2333f 100644 --- a/test/nodes/test_as.rb +++ b/test/nodes/test_as.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_ascending.rb b/test/nodes/test_ascending.rb index 2991d46583..9b0e5f0c18 100644 --- a/test/nodes/test_ascending.rb +++ b/test/nodes/test_ascending.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_bin.rb b/test/nodes/test_bin.rb index 0dcc5f7bb8..af27d827fd 100644 --- a/test/nodes/test_bin.rb +++ b/test/nodes/test_bin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_binary.rb b/test/nodes/test_binary.rb index 7e25a21151..8e3025a440 100644 --- a/test/nodes/test_binary.rb +++ b/test/nodes/test_binary.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'set' diff --git a/test/nodes/test_bind_param.rb b/test/nodes/test_bind_param.rb index ea008f4c99..011de6410c 100644 --- a/test/nodes/test_bind_param.rb +++ b/test/nodes/test_bind_param.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_case.rb b/test/nodes/test_case.rb index a813ec7e69..21ff670e05 100644 --- a/test/nodes/test_case.rb +++ b/test/nodes/test_case.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_casted.rb b/test/nodes/test_casted.rb index 6d775e17ec..748879a538 100644 --- a/test/nodes/test_casted.rb +++ b/test/nodes/test_casted.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_count.rb b/test/nodes/test_count.rb index a9a329420e..85e93b1927 100644 --- a/test/nodes/test_count.rb +++ b/test/nodes/test_count.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::Count do diff --git a/test/nodes/test_delete_statement.rb b/test/nodes/test_delete_statement.rb index 4bd5446ba2..5ce51a9ae8 100644 --- a/test/nodes/test_delete_statement.rb +++ b/test/nodes/test_delete_statement.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::DeleteStatement do diff --git a/test/nodes/test_descending.rb b/test/nodes/test_descending.rb index fce71d69e9..98de94910f 100644 --- a/test/nodes/test_descending.rb +++ b/test/nodes/test_descending.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_distinct.rb b/test/nodes/test_distinct.rb index ffa8a68e6c..6c51b99946 100644 --- a/test/nodes/test_distinct.rb +++ b/test/nodes/test_distinct.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_equality.rb b/test/nodes/test_equality.rb index 42a156b051..83f73f1789 100644 --- a/test/nodes/test_equality.rb +++ b/test/nodes/test_equality.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_extract.rb b/test/nodes/test_extract.rb index eb98553268..307ef2572c 100644 --- a/test/nodes/test_extract.rb +++ b/test/nodes/test_extract.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::Extract do diff --git a/test/nodes/test_false.rb b/test/nodes/test_false.rb index a2a8866680..da65e71547 100644 --- a/test/nodes/test_false.rb +++ b/test/nodes/test_false.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_grouping.rb b/test/nodes/test_grouping.rb index febf0bee40..8379336109 100644 --- a/test/nodes/test_grouping.rb +++ b/test/nodes/test_grouping.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_infix_operation.rb b/test/nodes/test_infix_operation.rb index 40616024e5..b6c891a5c0 100644 --- a/test/nodes/test_infix_operation.rb +++ b/test/nodes/test_infix_operation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_insert_statement.rb b/test/nodes/test_insert_statement.rb index e0a5696ea4..af2c9541cb 100644 --- a/test/nodes/test_insert_statement.rb +++ b/test/nodes/test_insert_statement.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::InsertStatement do diff --git a/test/nodes/test_named_function.rb b/test/nodes/test_named_function.rb index 33830d9d43..1f765e822d 100644 --- a/test/nodes/test_named_function.rb +++ b/test/nodes/test_named_function.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_node.rb b/test/nodes/test_node.rb index 056df7a584..2fd27600be 100644 --- a/test/nodes/test_node.rb +++ b/test/nodes/test_node.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_not.rb b/test/nodes/test_not.rb index a08d037445..cd027cec16 100644 --- a/test/nodes/test_not.rb +++ b/test/nodes/test_not.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_or.rb b/test/nodes/test_or.rb index 3e7bcc9379..6bc02c0ad3 100644 --- a/test/nodes/test_or.rb +++ b/test/nodes/test_or.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_over.rb b/test/nodes/test_over.rb index 0aac00b230..183c02fad3 100644 --- a/test/nodes/test_over.rb +++ b/test/nodes/test_over.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::Over do diff --git a/test/nodes/test_select_core.rb b/test/nodes/test_select_core.rb index 4114bcf4ff..f868a2f940 100644 --- a/test/nodes/test_select_core.rb +++ b/test/nodes/test_select_core.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_select_statement.rb b/test/nodes/test_select_statement.rb index 3e4fcc0c07..ae209b86fd 100644 --- a/test/nodes/test_select_statement.rb +++ b/test/nodes/test_select_statement.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::SelectStatement do diff --git a/test/nodes/test_sql_literal.rb b/test/nodes/test_sql_literal.rb index c09e5882d5..74e4f2cc90 100644 --- a/test/nodes/test_sql_literal.rb +++ b/test/nodes/test_sql_literal.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'yaml' diff --git a/test/nodes/test_sum.rb b/test/nodes/test_sum.rb index d387e7f9ef..e1b65abbef 100644 --- a/test/nodes/test_sum.rb +++ b/test/nodes/test_sum.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::Sum do diff --git a/test/nodes/test_table_alias.rb b/test/nodes/test_table_alias.rb index 57c9a42fc6..39040e6352 100644 --- a/test/nodes/test_table_alias.rb +++ b/test/nodes/test_table_alias.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'ostruct' diff --git a/test/nodes/test_true.rb b/test/nodes/test_true.rb index ed4743a63b..35b4d0a14d 100644 --- a/test/nodes/test_true.rb +++ b/test/nodes/test_true.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_unary_operation.rb b/test/nodes/test_unary_operation.rb index d89c10b431..bde9594a2c 100644 --- a/test/nodes/test_unary_operation.rb +++ b/test/nodes/test_unary_operation.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/nodes/test_update_statement.rb b/test/nodes/test_update_statement.rb index 920dc6e3ef..09a4a09074 100644 --- a/test/nodes/test_update_statement.rb +++ b/test/nodes/test_update_statement.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' describe Arel::Nodes::UpdateStatement do diff --git a/test/nodes/test_window.rb b/test/nodes/test_window.rb index 9ec42be59f..b4ad22edb5 100644 --- a/test/nodes/test_window.rb +++ b/test/nodes/test_window.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/support/fake_record.rb b/test/support/fake_record.rb index 4867dad5dc..03116ff2ee 100644 --- a/test/support/fake_record.rb +++ b/test/support/fake_record.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module FakeRecord class Column < Struct.new(:name, :type) end diff --git a/test/test_attributes.rb b/test/test_attributes.rb index d0b00d4333..754fc0c134 100644 --- a/test/test_attributes.rb +++ b/test/test_attributes.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_crud.rb b/test/test_crud.rb index 5c470155ac..0832f82aee 100644 --- a/test/test_crud.rb +++ b/test/test_crud.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_delete_manager.rb b/test/test_delete_manager.rb index ece2389d88..2d068d3b8b 100644 --- a/test/test_delete_manager.rb +++ b/test/test_delete_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_factory_methods.rb b/test/test_factory_methods.rb index 3e23b090b4..3dbe2d615d 100644 --- a/test/test_factory_methods.rb +++ b/test/test_factory_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_insert_manager.rb b/test/test_insert_manager.rb index 4289b0fa8c..f6a76fc20f 100644 --- a/test/test_insert_manager.rb +++ b/test/test_insert_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index e88f0e8e11..076b732984 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_table.rb b/test/test_table.rb index e36a6e3a41..9877d24541 100644 --- a/test/test_table.rb +++ b/test/test_table.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/test_update_manager.rb b/test/test_update_manager.rb index f41dc46e7d..85abbf3875 100644 --- a/test/test_update_manager.rb +++ b/test/test_update_manager.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_bind_visitor.rb b/test/visitors/test_bind_visitor.rb index f0007cabbf..3e0578a6a1 100644 --- a/test/visitors/test_bind_visitor.rb +++ b/test/visitors/test_bind_visitor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'arel/visitors/bind_visitor' require 'support/fake_record' diff --git a/test/visitors/test_depth_first.rb b/test/visitors/test_depth_first.rb index 81220b63a4..0c7f7ccd34 100644 --- a/test/visitors/test_depth_first.rb +++ b/test/visitors/test_depth_first.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'set' diff --git a/test/visitors/test_dispatch_contamination.rb b/test/visitors/test_dispatch_contamination.rb index d3c9e8af2e..6422a6dff3 100644 --- a/test/visitors/test_dispatch_contamination.rb +++ b/test/visitors/test_dispatch_contamination.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_dot.rb b/test/visitors/test_dot.rb index 179a2c297c..1d27d1a5cb 100644 --- a/test/visitors/test_dot.rb +++ b/test/visitors/test_dot.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_ibm_db.rb b/test/visitors/test_ibm_db.rb index f1aa7612be..81a5713183 100644 --- a/test/visitors/test_ibm_db.rb +++ b/test/visitors/test_ibm_db.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_informix.rb b/test/visitors/test_informix.rb index 04c42f8f60..9d15979219 100644 --- a/test/visitors/test_informix.rb +++ b/test/visitors/test_informix.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_mssql.rb b/test/visitors/test_mssql.rb index fe228bce4b..0d0753b14b 100644 --- a/test/visitors/test_mssql.rb +++ b/test/visitors/test_mssql.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_mysql.rb b/test/visitors/test_mysql.rb index 30dcea3d36..9a205311d4 100644 --- a/test/visitors/test_mysql.rb +++ b/test/visitors/test_mysql.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_oracle.rb b/test/visitors/test_oracle.rb index 4c22be5cbb..b1921f0cbc 100644 --- a/test/visitors/test_oracle.rb +++ b/test/visitors/test_oracle.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_oracle12.rb b/test/visitors/test_oracle12.rb index 43235fd72c..c908a51d4f 100644 --- a/test/visitors/test_oracle12.rb +++ b/test/visitors/test_oracle12.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_postgres.rb b/test/visitors/test_postgres.rb index f97b734b7d..26cc721871 100644 --- a/test/visitors/test_postgres.rb +++ b/test/visitors/test_postgres.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_sqlite.rb b/test/visitors/test_sqlite.rb index a9f3501f20..2e145b3faa 100644 --- a/test/visitors/test_sqlite.rb +++ b/test/visitors/test_sqlite.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' module Arel diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index e31d60366b..07458c1dc5 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'helper' require 'set' |