diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:26:20 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:26:53 +0200 |
commit | 9617db2078e8a85c8944392c21dd748f932bbd80 (patch) | |
tree | 727d60f1d2f9bbb6510483c366f62d75e2647619 /activerecord/test/cases/quoting_test.rb | |
parent | 4df2b779ddfcb27761c71e00e2b241bfa06a0950 (diff) | |
download | rails-9617db2078e8a85c8944392c21dd748f932bbd80.tar.gz rails-9617db2078e8a85c8944392c21dd748f932bbd80.tar.bz2 rails-9617db2078e8a85c8944392c21dd748f932bbd80.zip |
applies new string literal convention in activerecord/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
Diffstat (limited to 'activerecord/test/cases/quoting_test.rb')
-rw-r--r-- | activerecord/test/cases/quoting_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/cases/quoting_test.rb b/activerecord/test/cases/quoting_test.rb index 225e23bc83..1c276aa765 100644 --- a/activerecord/test/cases/quoting_test.rb +++ b/activerecord/test/cases/quoting_test.rb @@ -16,20 +16,20 @@ module ActiveRecord end def test_quote_column_name - assert_equal "foo", @quoter.quote_column_name('foo') + assert_equal "foo", @quoter.quote_column_name("foo") end def test_quote_table_name - assert_equal "foo", @quoter.quote_table_name('foo') + assert_equal "foo", @quoter.quote_table_name("foo") end def test_quote_table_name_calls_quote_column_name @quoter.extend(Module.new { def quote_column_name(string) - 'lol' + "lol" end }) - assert_equal 'lol', @quoter.quote_table_name('foo') + assert_equal "lol", @quoter.quote_table_name("foo") end def test_quote_string @@ -86,7 +86,7 @@ module ActiveRecord end def test_quote_nil - assert_equal 'NULL', @quoter.quote(nil, nil) + assert_equal "NULL", @quoter.quote(nil, nil) end def test_quote_true @@ -114,11 +114,11 @@ module ActiveRecord def test_quote_bigdecimal bigdec = BigDecimal.new((1 << 100).to_s) - assert_equal bigdec.to_s('F'), @quoter.quote(bigdec, nil) + assert_equal bigdec.to_s("F"), @quoter.quote(bigdec, nil) end def test_dates_and_times - @quoter.extend(Module.new { def quoted_date(value) 'lol' end }) + @quoter.extend(Module.new { def quoted_date(value) "lol" end }) assert_equal "'lol'", @quoter.quote(Date.today, nil) assert_equal "'lol'", @quoter.quote(Time.now, nil) assert_equal "'lol'", @quoter.quote(DateTime.now, nil) |