Created
April 14, 2011 14:32
-
-
Save lucassus/919586 to your computer and use it in GitHub Desktop.
Difference between Dolorean and simple stub
This file contains 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 "for time just before the end time" do | |
before { Delorean.time_travel_to Time.parse('2011-04-03 23:58') } # two minutes to midnight ;) | |
after { Delorean.back_to_the_present } | |
it { should_not be_ended } | |
end | |
# ..and without magic DLS | |
context "for time just before the end time" do | |
before { Time.stubs(:now).returns(Time.parse('2011-04-03 23:58')) } # two minutes to midnight ;) | |
it { should_not be_ended } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment