RuntimeError

I noticed it in the output displayed in the “Run Feature” window. It was obscured because the angle brackets made it look like markup so all I saw was this:

Exception encountered: # backtrace

When I inspected the output, I saw the runtime error.

It has to do with the std_opts in the generated cucumber.yml file. Textmate wants html format but the default profile uses another format. So, Textmate tries to use both. I fixed it by adding this textmate-specific profile to cucumber.yml:

textmate:--drb --format html

Then I went to Preferences > Advanced > Shell Variables and added: “TM_CUCUMBER_OPTS –profile textmate”.

That done, ⌘r and ⌘^r worked again. But there was still one more problem.

Given #, When #, Then #

Even though it worked, the output was wrong. It looked like this:

Given #
When #
Then #

When I inspected the output in the “Run Feature” window, I saw this:

<drb::drbunknown:0x00000101849c78></drb::drbunknown:0x00000101849c78>

Once again, the angle brackets made it look like markup so the problem was obscured.

That was reported in September but never fixed (as far as I can tell). No biggie, monkey-patch to the rescue. Following the suggestion behind the link, I wrapped the patch in a Before block and placed it in features/support/textmate_spork_fix.rb: