Permalink
Browse files

More timezone corrections in tests

  • Loading branch information...
dburkes committed Feb 2, 2011
1 parent 43f9eb2 commit 5b3f99db6462d19144a45b3cb3cabc4bcecb1f3a
Showing with 6 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +4 −4 spec/acts_as_event_owner/event_specification_spec.rb
  3. +1 −1 spec/spec_helper.rb
View
@@ -5,3 +5,4 @@
.DS_Store
*.gem
*.rvmrc
+*.log
@@ -417,8 +417,8 @@ def create_daily_event(generate=nil)
@now = Time.zone.local(2011, 1, 16, 23, 00) # sunday
spec = create_event_specification :description => "mwf event", :start_at => @now, :repeat => :weekly, :on => [:mo, :we, :fr]
occurrence = spec.event_occurrences[1]
- occurrence.start_at.utc.wday.should == 1
- occurrence.start_at.utc.hour.should == 23
+ occurrence.start_at.in_time_zone.wday.should == 1
+ occurrence.start_at.in_time_zone.hour.should == 23
end
end
@@ -433,8 +433,8 @@ def create_daily_event(generate=nil)
occurrence = spec.event_occurrences[1].reload
# puts "*************** #{occurrence.start_at}"
# puts "*************** #{occurrence.start_at.zone}"
- occurrence.start_at.localtime.wday.should == 1
- occurrence.start_at.localtime.hour.should == 23
+ occurrence.start_at.in_time_zone.wday.should == 1
+ occurrence.start_at.in_time_zone.hour.should == 23
end
end
View
@@ -9,7 +9,7 @@
:adapter => 'sqlite3',
:database => ':memory:'
})
-# ActiveRecord::Base.logger = Logger.new(STDOUT)
+# ActiveRecord::Base.logger = Logger.new(File.open("test.log", "w"))
require File.expand_path('../../lib/acts_as_event_owner', __FILE__)
include ActsAsEventOwner

0 comments on commit 5b3f99d

Please sign in to comment.