spec/nsdate_spec.rb in sugarcube-0.20.25 vs spec/nsdate_spec.rb in sugarcube-1.0.0
- old
+ new
@@ -5,9 +5,20 @@
date.year.should == 2012
date.month.should == 1
date.day.should == 2
end
+ it "Should have an NSDate##now method" do
+ now = NSDate.new
+ date = NSDate.now
+ date.year.should == now.year
+ date.month.should == now.month
+ date.day.should == now.day
+ date.hour.should == now.hour
+ date.min.should == now.min
+ (date.sec - now.sec).should <= 1
+ end
+
it "Should have an NSDate##today method" do
now = NSDate.new
date = NSDate.today
date.year.should == now.year
date.month.should == now.month