mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
specifying an error not to raise is deprecated
This commit is contained in:
parent
7e3df143ed
commit
59586fb5d2
3 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue