Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Incompatibility with rack-test 0.7.1+ #1044

Closed
joemsak opened this issue Dec 19, 2017 · 2 comments
Closed

Incompatibility with rack-test 0.7.1+ #1044

joemsak opened this issue Dec 19, 2017 · 2 comments

Comments

@joemsak
Copy link
Contributor

joemsak commented Dec 19, 2017

Hey there thoughtbot, I just wanted to let you know that I have been struggling with an issue in my feature specs where submitting a form with an empty file field leads to this cryptic error:

# on a form that happens to have a file field, that you happen to be leaving empty

click_button 'Save'

#... raises exception

undefined method `size` for Nil::NilClass
# and just one line of backtrace at the click_button call in the test itself
#
# I discovered that the bug happens maybe 20 lines of backtrace away
# if you try to do the call in a debugger

And I did some digging and realized it was happening with Rack::Test::UploadedFile.

I found other people having the issue here rack/rack-test#211 and through some more study, I finally landed on the issue being that the current release of capybara-webkit requires capybara <= 2.14.0, and they have actually released a compatibility fix with rack-test 0.7.1+ in their latest release, 2.16.1

If you go to the issue linked in rack-test, you can find my comments at the bottom which detail how I reached my conclusions.

Do you have any plans to update to the newest version of capybara and therefore rack-test soon, or should I keep using my patched fork of rack-test, or otherwise lock my rack-test gem down to an earlier version?

Thank you for your time!

@twalpole
Copy link
Collaborator

twalpole commented Jan 2, 2018

You can lock your rack-test (or move to 0.8 I believe) or try the capybara-webkit master branch and upgrade Capybara.

@joemsak
Copy link
Contributor Author

joemsak commented Jan 2, 2018

Thank you @twalpole I confirm that the master branch is working for me <3

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

No branches or pull requests

2 participants