From ea746f259937cb654059242e119bacb68f7f2156 Mon Sep 17 00:00:00 2001 From: Andrew Vit Date: Thu, 9 Jul 2015 15:23:01 -0700 Subject: [PATCH] Fix time-dependent test failure --- spec/ransack/adapters/active_record/base_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/ransack/adapters/active_record/base_spec.rb b/spec/ransack/adapters/active_record/base_spec.rb index 475870021..037b9a7e4 100644 --- a/spec/ransack/adapters/active_record/base_spec.rb +++ b/spec/ransack/adapters/active_record/base_spec.rb @@ -145,6 +145,9 @@ def self.sane_adapter? end it "should function correctly with a multi-parameter attribute" do + ::ActiveRecord::Base.default_timezone = :utc + Time.zone = 'UTC' + date = Date.current s = Person.ransack( { "created_at_gteq(1i)" => date.year,