Permalink
Browse files

Fix 1.8.7 compatibility in new tests

  • Loading branch information...
1 parent 9b744a4 commit 5e0657f8d5bde480c818607381bdd5c50730ac0f Sam Goldstein committed Dec 5, 2012
Showing with 9 additions and 8 deletions.
  1. +1 −0 Gemfile
  2. +8 −8 spec/timetrap_spec.rb
View
@@ -7,6 +7,7 @@ gem 'getopt-declare', ">= 1.28"
gem 'json', ">= 1.4.6"
gem 'icalendar', "~>1.1.5"
gem 'rake'
+gem 'rdoc'
group :test do
gem "rspec", "~>2"
View
@@ -602,16 +602,16 @@ def output
describe "month" do
it "should display all entries for the month" do
create_entry(
- :start => Time.new(2012, 2, 5, 1, 2, 3),
- :end => Time.new(2012, 2, 5, 2, 2, 3),
+ :start => Time.local(2012, 2, 5, 1, 2, 3),
+ :end => Time.local(2012, 2, 5, 2, 2, 3)
)
create_entry(
- :start => Time.new(2012, 2, 6, 1, 2, 3),
- :end => Time.new(2012, 2, 6, 2, 2, 3),
+ :start => Time.local(2012, 2, 6, 1, 2, 3),
+ :end => Time.local(2012, 2, 6, 2, 2, 3)
)
create_entry(
- :start => Time.new(2012, 1, 5, 1, 2, 3),
- :end => Time.new(2012, 1, 5, 2, 2, 3),
+ :start => Time.local(2012, 1, 5, 1, 2, 3),
+ :end => Time.local(2012, 1, 5, 2, 2, 3)
)
Date.should_receive(:today).and_return(Date.new(2012, 2, 5))
@@ -624,8 +624,8 @@ def output
it "should work in December" do
create_entry(
- :start => Time.new(2012, 12, 5, 1, 2, 3),
- :end => Time.new(2012, 12, 5, 2, 2, 3),
+ :start => Time.local(2012, 12, 5, 1, 2, 3),
+ :end => Time.local(2012, 12, 5, 2, 2, 3)
)
Date.should_receive(:today).and_return(Date.new(2012, 12, 5))

0 comments on commit 5e0657f

Please sign in to comment.