Support check for status code

This commit is contained in:
Max Meyer 2014-07-29 09:04:10 +02:00
parent 6dc7eb6353
commit 398a038523

View file

@ -95,6 +95,10 @@ Then /^I should not see:$/ do |expected|
expect(@browser.last_response.body).to_not include(expected.chomp)
end
Then /^the status code should be "([^\"]*)"$/ do |expected|
expect(@browser.last_response.status).to eq expected.to_i
end
Then /^I should see "([^\"]*)" lines$/ do |lines|
expect(@browser.last_response.body.chomp.split($/).length).to eq(lines.to_i)
end