Created
June 26, 2012 12:50
-
-
Save rubystar/2995630 to your computer and use it in GitHub Desktop.
spec/models/ad_spec.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "when sd is today" do | |
it "should set start_date appropriately" do | |
@ad.start_date = Date.today | |
@ad.start_date.to_s.should == DateTime.parse("Wed, 15 Sep 2010 13:15:00 -0500").in_time_zone.to_s | |
end | |
end | |
context "when sd is tomorrow" do | |
it "should set start_date appropriately" do | |
@ad.start_date = Date.tomorrow | |
@ad.start_date.to_s.should == DateTime.parse("Thu, 16 Sep 2010 00:00:00 -0500").in_time_zone.to_s | |
end | |
end | |
......... | |
context "when ed is today" do | |
it "should set end_date appropriately" do | |
@ad.end_date = Date.today | |
@ad.end_date.to_s.should == DateTime.parse("Wed, 15 Sep 2010 23:59:59 -0500").in_time_zone.to_s | |
end | |
end | |
context "when ed is tomorrow" do | |
it "should set end_date appropriately" do | |
@ad.end_date = Date.tomorrow | |
@ad.end_date.to_s.should == DateTime.parse("Thu, 16 Sep 2010 23:59:59 -0500").in_time_zone.to_s | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment