Assuming you have a debugger in the Gemfile, here is how you can use it. (It is assumed that you are using the Rack driver for Capybara.)
# test.rb visit new_member_registration_path fill_in('Name:', :with => 'Rob Doe' ) debugger
The terminal will stop your script and wait for you to do something.
# Terminal /file/path/to/you/test.rb:12 fill_in('Name:', :with => 'Rob Doe' ) (rdb:1)
Open an IRB session here:
(rdb:1) irb
Here you can use any RSpec or Capybara method:
>> current_path.should == 'foo/bar'
Try submitting the form at this point:
>> click_button "Sign Up" >> save_and_open_page
See what error messages are provided to you on the received page. With the Rack driver, you will not see the completed fields. In this case, you can try using the Selenium driver
However, you cannot control Capybara from IRB using the Selenium driver. However, you can see what forms of value Selenium puts into your form. Because Selenium happens quickly, you can use the debugger to pause the test while you check the page that Selenium has opened in your browser.
monocle
source share