`save_and_open` is using body as filename #15

Closed
tylerhunt opened this Issue Dec 31, 2012 · 4 comments

2 participants

@tylerhunt

Capybara::Session#save_and_open_page takes a file name argument, but Capybara::Node::Email#save_and_open is passing it the body instead. This results in directories and files being created with the content of the email, like so:

$> ls -l tmp/capybara/
total 0
drwxr-xr-x  3 thunt  staff  102 Dec 31 14:17 <!DOCTYPE html>??<html>??  <head>??    <meta content="text

The resulting file is empty.

@bcardarella
⚓️ DockYard ⚓️ member

@tylerhunt what version of Capybara are you using?

@bcardarella
⚓️ DockYard ⚓️ member

actually this looks like a Capybara 2.0 issue. Confirmed, I should have a fix in about 30 minute or so. Sorry it took a few days to get to

@bcardarella
⚓️ DockYard ⚓️ member

@tylerhunt try out master branch and let me know.

Capybara itself doesn't have any tests for this so I wasn't sure myself how best to test it.

@tylerhunt

Works great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment