2013-01-14

Entries

Ran into some troubles while trying to add Cucumber to my Ubyray library.

#

The main error was cannot load such file -- /Users/brian/Dropbox/Projects/ubyray/features/lib/ubyray.

#

I assumed it was colliding with RSpec or something and trying load the same files multiple times since it also complained /Users/brian/Dropbox/Projects/ubyray/lib/ubyray/version.rb:2: warning: already initialized constant VERSION

#

If you run cucumber --help you'll see the --require which lets you specify libraries and directories you want to include. The default behavior is just to include all .rb files recursively.

#

So I ended up running it as cucumber -r lib -r features which worked.

#

I then put these in a cucumber.yml file in the base of my project: default: --require lib --require features

#

So the default 'profile' will always use those options.

#

I'm still seeing /Users/brian/Dropbox/Projects/ubyray/lib/ubyray/version.rb:2: warning: already initialized constant VERSION though but the features are running (and passing!) for now.

#

Comments

comments powered by Disqus