From 59586fb5d2397dc4c46d465bfba9ec0a3a4fb187 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sun, 11 Aug 2013 15:38:42 +0100 Subject: [PATCH] specifying an error not to raise is deprecated --- spec/browser_spec.rb | 2 +- spec/driver_spec.rb | 12 ++++++------ spec/integration/session_spec.rb | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/browser_spec.rb b/spec/browser_spec.rb index 1ed7815..74c770e 100644 --- a/spec/browser_spec.rb +++ b/spec/browser_spec.rb @@ -257,7 +257,7 @@ describe Capybara::Webkit::Browser do browser = Capybara::Webkit::Browser.new(connection) - expect { browser.visit("/") }.not_to raise_error(/empty response/) + expect { browser.visit("/") }.not_to raise_error end describe '#command' do diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index da61737..023e88a 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -2080,13 +2080,13 @@ describe Capybara::Webkit::Driver do it "returns 401 for incorrectly authenticated request" do driver.browser.authenticate('user1', 'password1') driver.browser.timeout = 2 - lambda { visit("/") }.should_not raise_error(Timeout::Error) + lambda { visit("/") }.should_not raise_error driver.status_code.should eq 401 end it "returns 401 for unauthenticated request" do driver.browser.timeout = 2 - lambda { visit("/") }.should_not raise_error(Timeout::Error) + lambda { visit("/") }.should_not raise_error driver.status_code.should eq 401 end end @@ -2192,7 +2192,7 @@ describe Capybara::Webkit::Driver do it "should not raise a timeout error when zero" do driver.browser.timeout = 0 - lambda { visit("/") }.should_not raise_error(Timeout::Error) + lambda { visit("/") }.should_not raise_error end it "should raise a timeout error" do @@ -2202,12 +2202,12 @@ describe Capybara::Webkit::Driver do it "should not raise an error when the timeout is high enough" do driver.browser.timeout = 10 - lambda { visit("/") }.should_not raise_error(Timeout::Error) + lambda { visit("/") }.should_not raise_error end it "should set the timeout for each request" do driver.browser.timeout = 10 - lambda { visit("/") }.should_not raise_error(Timeout::Error) + lambda { visit("/") }.should_not raise_error driver.browser.timeout = 1 lambda { visit("/") }.should raise_error(Timeout::Error) end @@ -2217,7 +2217,7 @@ describe Capybara::Webkit::Driver do lambda { visit("/") }.should raise_error(Timeout::Error) driver.reset! driver.browser.timeout = 10 - lambda { visit("/") }.should_not raise_error(Timeout::Error) + lambda { visit("/") }.should_not raise_error end it "should raise a timeout on a slow form" do diff --git a/spec/integration/session_spec.rb b/spec/integration/session_spec.rb index 39bd27f..8dc807a 100644 --- a/spec/integration/session_spec.rb +++ b/spec/integration/session_spec.rb @@ -391,7 +391,7 @@ describe Capybara::Session do it 'does not raise an error when an anchor contains empty nodes' do subject.visit('/') - lambda { subject.click_link('Some link') }.should_not raise_error(Capybara::Webkit::ClickFailed) + lambda { subject.click_link('Some link') }.should_not raise_error end it 'scrolls an element into view when clicked' do @@ -474,7 +474,7 @@ describe Capybara::Session do }, 400); JS - lambda { subject.click_link "Click Me" }.should_not raise_error(Capybara::Webkit::ClickFailed) + lambda { subject.click_link "Click Me" }.should_not raise_error end end end