Debugging Cucumber in RubyMine {Quick Hit}

Posted on May 9, 2011

Using Cucumber and Rspec for the first time has been … a little frustrating. I followed along with the main tutorial in The Rspec Book and then skimmed the later chapters. I thought it was quite good until I had to start testing an actual rails app and felt a little at a loss. But I digress …

After a few attempts at debugging in and outside of RubyMine, I finally googled and came across this post on configuring cucumber in RubyMine and this post on debugging Rspec in RubyMine. Taking those as a starting point, I finally got things working. Here’s how:

First, create a debug scenario in RubyMine by right-clicking on your features file and select “Create ‘[file_name]’ …”

Then remove “ruby-debug19” (and any other ruby-debug) gems from your Gemfile.

Also, remove any “require ‘ruby-debugs'”s.

Then select the feature in the run drop down.

Click on Debug!

Wham, bam, thank you ma’am.


2 Replies to "Debugging Cucumber in RubyMine {Quick Hit}"

  • Henner
    November 2, 2011 (11:58 pm)
    Reply

    Thank. You. So. Much. 🙂

  • Gabe
    December 29, 2011 (6:54 am)
    Reply

    Thank you!


Got something to say?

Some html is OK

This site uses Akismet to reduce spam. Learn how your comment data is processed.