[rspec-users] Problems running features with Textmate Cucumber bundle

Rick DeNatale rick.denatale at gmail.com
Mon Apr 27 13:33:25 EDT 2009

On Mon, Apr 27, 2009 at 11:42 AM, Ben Mabey <ben at benmabey.com> wrote:
> Do you happen to be explicitly requiring any of your step definitions from
> your env.rb or other files?  What does your env.rb look like?

Yes, env.rb is right out of the RSpec book B4.0 'printing' p 43

$: << File.join(File.dirname(__FILE__), "/../../lib" )
require 'spec/expectations'
require 'mastermind'

You are right that the false is being output by running the command,
not the command line.  I hacked the runner.rb file in the bundle to
insert a <br\> between outputting and running the command.

The mystery is why the same command running in Textmate reloads the
spec definition, but not when invoked by bash?  And when I add false
to the end of the command in bash it does.

Having just typed that I realize that I wasn't really sure that the
reload WAS the problem running under textmate. So I hacked the run
method in runner.rb in the bundle to show stderr as well as stdout:

        in_project_dir do
          @output << %Q{Running: #{full_command = "bash \"2>&1
#{command} #{@file.rake_task} #{argv.join(' ')}\""} \n}
          @output << "<br\>"
          @output << Kernel.system(full_command)

And this outputs:

Running: bash "2>&1 cucumber
bash: 2>&1 cucumber
--format=html: No such file or directory false

I'm guessing that the file it isn't finding is cucumber?  Is there an
environment variable I need to set in textmate?

Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

More information about the rspec-users mailing list