Permalink
Browse files

Small tweaks to specs to make them pass and be more portable.

  • Loading branch information...
1 parent c02b71a commit 0561b52aadf3e03222c07f0aab494d7ddb5e07c7 @sam sam committed Sep 8, 2008
Showing with 4 additions and 3 deletions.
  1. +4 −3 spec/datetime_spec.rb
View
7 spec/datetime_spec.rb
@@ -3,19 +3,20 @@
describe DateTime, "#to_time" do
before do
- @expected = "Wed Aug 20 02:16:06 -0700 2008"
- datetime = DateTime.parse(@expected)
+ @expected = Time.now.to_s
+ @datetime = DateTime.parse(@expected)
end
it "should return a copy of time" do
- time = datetime.to_time
+ time = @datetime.to_time
time.class.should == Time
time.to_s.should == @expected
end
end
describe Time, "#to_datetime" do
it "should return a copy of its self" do
+ datetime = DateTime.now
datetime.to_datetime.should == datetime
end
end

0 comments on commit 0561b52

Please sign in to comment.