Skip to content

Instantly share code, notes, and snippets.

@JasonY1
Created November 19, 2014 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JasonY1/21852890c820cb04fa5a to your computer and use it in GitHub Desktop.
Save JasonY1/21852890c820cb04fa5a to your computer and use it in GitHub Desktop.
context "during the weekend" do
before do
before_open = Time.parse("01/04/2014 11:00 PST") # Saturday 11:00AM
while_open = Time.parse("01/04/2014 14:00 PST") # Saturday 2:00PM
after_closed = Time.parse("01/04/2014 18:00 PST") # Saturday 6:00PM
end
it "displays 'Phones Closed' before open" do
Time.stub(:now).returns(before_open)
expect { phone_lines_open?(before_open).to eq false }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment