Fix save_and_open_screenshot for 3rd drivers

The screenshot path will not start with `capybara/` for 3rd drivers like
poltergeist since they aren't on capybara itself.

See https://travis-ci.org/teampoltergeist/poltergeist/jobs/28737963#L534
This commit is contained in:
Gabriel Sobrinho 2014-06-29 20:55:24 -03:00
parent 86584c0f6e
commit 1013f834a5
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ Capybara::SpecHelper.spec '#save_and_open_screenshot' do
end
it 'opens file from the default directory', :requires => [:screenshot] do
expected_file_regex = %r{capybara/capybara-\d+\.png}
expected_file_regex = %r{capybara-\d+\.png}
allow(@session.driver).to receive(:save_screenshot)
allow(Launchy).to receive(:open)