-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix time-dependent test failure #561
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally, if just temporary, a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you like to make a PR? |
||
|
||
date = Date.current | ||
s = Person.ransack( | ||
{ "created_at_gteq(1i)" => date.year, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would have been better to have this in
config/environments/test.rb
, as this could lead to unexpected behaviour for other specs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... a different TZ is set in
spec_helper.rb
as well. Suggestion?