Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after capybara example is rescued page has been reset #102

Open
catmando opened this issue Sep 15, 2016 · 4 comments
Open

after capybara example is rescued page has been reset #102

catmando opened this issue Sep 15, 2016 · 4 comments

Comments

@catmando
Copy link

Pry rescue is great.

However when using it with capybara + poltergeist once you hit the rescue you can't poke around, get a screen shot etc.

For example:

   # somewhere in my test
   page.should have_content('foobar')
   # if the above line fails, I can do (for example) page.save_screenshot

I have checked my after/before handlers, and as far as I can see I have all resets, etc turned off.

Anything else I can try?

@PhilT
Copy link

PhilT commented Apr 19, 2017

I see this as well. I think it's still running database clean up tasks so either the transaction completes or (in my case) it's truncating all the tables. I don't have a solution yet.

@PhilT
Copy link

PhilT commented Apr 19, 2017

Probably duplicate of #99

@joallard
Copy link
Collaborator

The way I'm able to confirm #99 is to notice that putting require 'pry-rescue/rspec' at the top of the file gives me empty database tables, but putting binding.pry right before the error doesn't trigger the bug. Maybe it applies in this case.

@dkniffin
Copy link

I was also experiencing this, but I don't think it was quite the same issue as others had. In my case, I was running rspec via I was running rspec via bundle exec rescue bin/rspec. The fix was to instead add require 'pry-rescue/rspec'to the top of myspec/rails_helper.rbfile, then run my specs normally usingbin/spec`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants