Created
July 2, 2013 19:16
-
-
Save richmolj/5912220 to your computer and use it in GitHub Desktop.
pseudo code
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 the service is down" do | |
before do | |
SomeService.stub(:get).and_raise(BadResponseError) | |
end | |
it "should show a friendly error message" do | |
visit '/some-url' | |
click_link 'Tab 2' | |
page.find("#loading_indicator").should_not_be_visible | |
within ".error-container" do | |
find('.message').should have_text("We're sorry, an error occurred") | |
end | |
page.save_screenshot("screenshot.png") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment