From 5cc7c31025921af4934477d677ec6e623f6e40d3 Mon Sep 17 00:00:00 2001 From: Carl Thuringer Date: Wed, 19 Sep 2018 10:30:21 -0500 Subject: [PATCH 1/2] Fix deprecation warning re: sqlite representing boolean as integer. --- test/test_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index cb1d47991..1b508a65d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -51,6 +51,7 @@ class TestApp < Rails::Application ActiveRecord::Schema.verbose = false config.active_record.schema_format = :none + config.active_record.sqlite3.represent_boolean_as_integer = true config.active_support.test_order = :random if Rails::VERSION::MAJOR >= 5 From b4c0bdd72ed3d64385365a3bf6d7a8ec20bf7891 Mon Sep 17 00:00:00 2001 From: Carl Thuringer Date: Wed, 19 Sep 2018 11:32:49 -0500 Subject: [PATCH 2/2] Only set this configuration option in Rails >= 5.2 --- test/test_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 1b508a65d..26875f19e 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -51,13 +51,15 @@ class TestApp < Rails::Application ActiveRecord::Schema.verbose = false config.active_record.schema_format = :none - config.active_record.sqlite3.represent_boolean_as_integer = true config.active_support.test_order = :random if Rails::VERSION::MAJOR >= 5 config.active_support.halt_callback_chains_on_return_false = false config.active_record.time_zone_aware_types = [:time, :datetime] config.active_record.belongs_to_required_by_default = false + if Rails::VERSION::MINOR >= 2 + config.active_record.sqlite3.represent_boolean_as_integer = true + end end end