Mark Lynn
2009-Mar-31 12:36 UTC
[rspec-users] [Cucumber] Running single feature from command line
I am using Cucumber 0.2.3 and am having problems running a single feature. In particular, the cucumber Textmate bundle was not working so I traced it back and discovered that I could not run single files or features from the command line either. My setup has the following line in cucumber.yml default: -r features/support/env.rb -r features/support/plain.rb -r features/steps features/plain When I run just plain cucumber from the command line, all my scenarios run and all features pass. However, if I try to run the command cucumber -r features/support/env.rb -r features/support/plain.rb -r features/steps features/plain OR cucumber -r features/support/env.rb -r features/support/plain.rb -r features/steps features/plain/login.feature I get Failed to load features/support/env.rb from /Library/Ruby/Site/1.8/ rubygems/custom_require.rb:31:in `polyglot_original_require'' from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in `require'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:144:in `invoke_requires'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:143:in `each'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:143:in `invoke_requires'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:104:in `initialize'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1291:in `call'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1291:in `parse_in_order'' ... 31 levels... from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/ cli/main.rb:20:in `execute'' from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 from /usr/bin/cucumber:19:in `load'' from /usr/bin/cucumber:19 I''m assuming the repeated use of the -r flag is not acceptable, but I need to specify multiple files. How can I get this to work from the command line so I can also use it in Textmate? - Mark Mark Lynn Sabado Technologies
Joseph Wilk
2009-Mar-31 13:26 UTC
[rspec-users] [Cucumber] Running single feature from command line
Mark Lynn wrote:> I am using Cucumber 0.2.3 and am having problems running a single > feature. In particular, the cucumber Textmate bundle was not working > so I traced it back and discovered that I could not run single files > or features from the command line either. My setup has the following > line in cucumber.yml > > default: -r features/support/env.rb -r features/support/plain.rb -r > features/steps features/plain > > When I run just plain cucumber from the command line, all my scenarios > run and all features pass. However, if I try to run the command > > cucumber -r features/support/env.rb -r features/support/plain.rb -r > features/steps features/plain > > OR > > cucumber -r features/support/env.rb -r features/support/plain.rb -r > features/steps features/plain/login.feature > > I get > > Failed to load features/support/env.rb from > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > `polyglot_original_require'' > from > /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in > `require'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:144:in > `invoke_requires'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in > `each'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in > `invoke_requires'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:104:in > `initialize'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in > `call'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in > `parse_in_order'' > ... 31 levels... > from > /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in > `execute'' > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 > from /usr/bin/cucumber:19:in `load'' > from /usr/bin/cucumber:19 > > I''m assuming the repeated use of the -r flag is not acceptable, but I > need to specify multiple files.Cucumber will accept multiple -r or --require. It simply pushes all the requires onto a stack and requires them all. Looks like this is a polygot problem. Aslak recently forked and patched a copy of Treetop to avoid the dependency on this: git://github.com/aslakhellesoy/treetop.git I would suggest you try and install treetop from this source and see if that fixes the problem. HTH -- Joseph Wilk http://blog.josephwilk.net> How can I get this to work from the command line so I can also use it > in Textmate? > > - Mark > > Mark Lynn > Sabado Technologies > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Mark Lynn
2009-Mar-31 14:31 UTC
[rspec-users] [Cucumber] Running single feature from command line
Joseph, Thanks - treetop did get me past the previous error message. Now, I get $ cucumber -r features/support/env.rb -r features/support/plain.rb -r features/steps features/plain /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'': no such file to load -- features/steps (LoadError) Failed to load features/support/env.rb from /Library/Ruby/Site/1.8/ rubygems/custom_require.rb:31:in `require'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:144:in `invoke_requires'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:143:in `each'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:143:in `invoke_requires'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:104:in `initialize'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1291:in `call'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1291:in `parse_in_order'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1247:in `catch'' ... 26 levels... from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/ cli/main.rb:20:in `execute'' from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 from /usr/bin/cucumber:19:in `load'' from /usr/bin/cucumber:19 It seems weird that these exact options work in the cucumber.yml file, but not from the command line. Any other thoughts? - Mark Mark Lynn Sabado Technologies On Mar 31, 2009, at 9:26 AM, Joseph Wilk wrote:> Mark Lynn wrote: >> I am using Cucumber 0.2.3 and am having problems running a single >> feature. In particular, the cucumber Textmate bundle was not >> working so I traced it back and discovered that I could not run >> single files or features from the command line either. My setup has >> the following line in cucumber.yml >> >> default: -r features/support/env.rb -r features/support/plain.rb -r >> features/steps features/plain >> >> When I run just plain cucumber from the command line, all my >> scenarios run and all features pass. However, if I try to run the >> command >> >> cucumber -r features/support/env.rb -r features/support/plain.rb -r >> features/steps features/plain >> >> OR >> >> cucumber -r features/support/env.rb -r features/support/plain.rb -r >> features/steps features/plain/login.feature >> >> I get >> >> Failed to load features/support/env.rb from /Library/Ruby/Site/ >> 1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'' >> from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb: >> 54:in `require'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:144:in `invoke_requires'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:143:in `each'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:143:in `invoke_requires'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:104:in `initialize'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ >> lib/ruby/1.8/optparse.rb:1291:in `call'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ >> lib/ruby/1.8/optparse.rb:1291:in `parse_in_order'' >> ... 31 levels... >> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/ >> cucumber/cli/main.rb:20:in `execute'' >> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 >> from /usr/bin/cucumber:19:in `load'' >> from /usr/bin/cucumber:19 >> >> I''m assuming the repeated use of the -r flag is not acceptable, but >> I need to specify multiple files. > > Cucumber will accept multiple -r or --require. It simply pushes all > the requires onto a stack and requires them all. > > Looks like this is a polygot problem. Aslak recently forked and > patched a copy of Treetop to avoid the dependency on this: > > git://github.com/aslakhellesoy/treetop.git > > I would suggest you try and install treetop from this source and see > if that fixes the problem. > > HTH > -- > Joseph Wilk > http://blog.josephwilk.net > >> How can I get this to work from the command line so I can also use >> it in Textmate? >> >> - Mark >> >> Mark Lynn >> Sabado Technologies >> >> >> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Mark Lynn
2009-Mar-31 15:22 UTC
[rspec-users] [Cucumber] Running single feature from command line
When I use Aslak''s version of Treetop as Joseph suggested, this does get rid of the polyglot error. However, I still get the following when running from the command line: $ cucumber -r features/steps -r features/support/env.rb features/plain/ user_home_page.feature /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'': no such file to load -- features/steps (LoadError) Failed to load features/support/env.rb from /Library/Ruby/Site/1.8/ rubygems/custom_require.rb:31:in `require'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:144:in `invoke_requires'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:143:in `each'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:143:in `invoke_requires'' from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ option_parser.rb:104:in `initialize'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1291:in `call'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1291:in `parse_in_order'' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/optparse.rb:1247:in `catch'' ... 26 levels... from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/ cli/main.rb:20:in `execute'' from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 from /usr/bin/cucumber:19:in `load'' from /usr/bin/cucumber:19 Any idea why rspec code is being called here? I did discover that if I uninstall cucumber 0.2.3 and try version 0.1.16, then the above command line works as does using the profile. I''m not sure if this indicates a bug in 0.2.3. Mark Lynn Sabado Technologies On Mar 31, 2009, at 9:26 AM, Joseph Wilk wrote:> Mark Lynn wrote: >> I am using Cucumber 0.2.3 and am having problems running a single >> feature. In particular, the cucumber Textmate bundle was not >> working so I traced it back and discovered that I could not run >> single files or features from the command line either. My setup has >> the following line in cucumber.yml >> >> default: -r features/support/env.rb -r features/support/plain.rb -r >> features/steps features/plain >> >> When I run just plain cucumber from the command line, all my >> scenarios run and all features pass. However, if I try to run the >> command >> >> cucumber -r features/support/env.rb -r features/support/plain.rb -r >> features/steps features/plain >> >> OR >> >> cucumber -r features/support/env.rb -r features/support/plain.rb -r >> features/steps features/plain/login.feature >> >> I get >> >> Failed to load features/support/env.rb from /Library/Ruby/Site/ >> 1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'' >> from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb: >> 54:in `require'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:144:in `invoke_requires'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:143:in `each'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:143:in `invoke_requires'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:104:in `initialize'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ >> lib/ruby/1.8/optparse.rb:1291:in `call'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ >> lib/ruby/1.8/optparse.rb:1291:in `parse_in_order'' >> ... 31 levels... >> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/ >> cucumber/cli/main.rb:20:in `execute'' >> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 >> from /usr/bin/cucumber:19:in `load'' >> from /usr/bin/cucumber:19 >> >> I''m assuming the repeated use of the -r flag is not acceptable, but >> I need to specify multiple files. > > Cucumber will accept multiple -r or --require. It simply pushes all > the requires onto a stack and requires them all. > > Looks like this is a polygot problem. Aslak recently forked and > patched a copy of Treetop to avoid the dependency on this: > > git://github.com/aslakhellesoy/treetop.git > > I would suggest you try and install treetop from this source and see > if that fixes the problem. > > HTH > -- > Joseph Wilk > http://blog.josephwilk.net > >> How can I get this to work from the command line so I can also use >> it in Textmate? >> >> - Mark >> >> Mark Lynn >> Sabado Technologies >> >> >> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
aslak hellesoy
2009-Mar-31 15:56 UTC
[rspec-users] [Cucumber] Running single feature from command line
On Tue, Mar 31, 2009 at 5:22 PM, Mark Lynn <mark at sabado.com> wrote:> > When I use Aslak''s version of Treetop as Joseph suggested, this does get > rid of the polyglot error. However, I still get the following when running > from the command line: > > $ cucumber -r features/steps -r features/support/env.rb > features/plain/user_home_page.feature > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'': no such file to load -- features/steps (LoadError) > Failed to load features/support/env.rb from > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:144:in > `invoke_requires'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in > `each'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in > `invoke_requires'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:104:in > `initialize'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in > `call'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in > `parse_in_order'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1247:in > `catch'' > ... 26 levels... > from > /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in > `execute'' > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 > from /usr/bin/cucumber:19:in `load'' > from /usr/bin/cucumber:19 > > Any idea why rspec code is being called here? I did discover that if I > uninstall cucumber 0.2.3 and try version 0.1.16, then the above command line > works as does using the profile. I''m not sure if this indicates a bug in > 0.2.3. >It''s actually a bug in RSpec that is only triggered in Cucumber 0.2 (bin/cucumber used to consume ARGV, but now leaves it intact, and RSpec blows up). https://rspec.lighthouseapp.com/projects/16211/tickets/200 https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/767 Do you have a Rails app? See how Chris Flipse got around the error in the #200 ticket. Aslak> > Mark Lynn > Sabado Technologies > > > On Mar 31, 2009, at 9:26 AM, Joseph Wilk wrote: > > Mark Lynn wrote: >> >>> I am using Cucumber 0.2.3 and am having problems running a single >>> feature. In particular, the cucumber Textmate bundle was not working so I >>> traced it back and discovered that I could not run single files or features >>> from the command line either. My setup has the following line in >>> cucumber.yml >>> >>> default: -r features/support/env.rb -r features/support/plain.rb -r >>> features/steps features/plain >>> >>> When I run just plain cucumber from the command line, all my scenarios >>> run and all features pass. However, if I try to run the command >>> >>> cucumber -r features/support/env.rb -r features/support/plain.rb -r >>> features/steps features/plain >>> >>> OR >>> >>> cucumber -r features/support/env.rb -r features/support/plain.rb -r >>> features/steps features/plain/login.feature >>> >>> I get >>> >>> Failed to load features/support/env.rb from >>> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>> `polyglot_original_require'' >>> from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in >>> `require'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:144:in >>> `invoke_requires'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in >>> `each'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in >>> `invoke_requires'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:104:in >>> `initialize'' >>> from >>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in >>> `call'' >>> from >>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in >>> `parse_in_order'' >>> ... 31 levels... >>> from >>> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in >>> `execute'' >>> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 >>> from /usr/bin/cucumber:19:in `load'' >>> from /usr/bin/cucumber:19 >>> >>> I''m assuming the repeated use of the -r flag is not acceptable, but I >>> need to specify multiple files. >>> >> >> Cucumber will accept multiple -r or --require. It simply pushes all the >> requires onto a stack and requires them all. >> >> Looks like this is a polygot problem. Aslak recently forked and patched a >> copy of Treetop to avoid the dependency on this: >> >> git://github.com/aslakhellesoy/treetop.git >> >> I would suggest you try and install treetop from this source and see if >> that fixes the problem. >> >> HTH >> -- >> Joseph Wilk >> http://blog.josephwilk.net >> >> How can I get this to work from the command line so I can also use it in >>> Textmate? >>> >>> - Mark >>> >>> Mark Lynn >>> Sabado Technologies >>> >>> >>> >>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >>> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090331/2a4408b5/attachment-0001.html>
Joseph Wilk
2009-Mar-31 16:48 UTC
[rspec-users] [Cucumber] Running single feature from command line
Mark Lynn wrote:> > When I use Aslak''s version of Treetop as Joseph suggested, this does > get rid of the polyglot error. However, I still get the following when > running from the command line: > > $ cucumber -r features/steps -r features/support/env.rb > features/plain/user_home_page.feature > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'': no such file to load -- features/steps > (LoadError) > Failed to load features/support/env.rb from > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:144:in > `invoke_requires'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in > `each'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in > `invoke_requires'' > from > /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:104:in > `initialize'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in > `call'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in > `parse_in_order'' > from > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1247:in > `catch'' > ... 26 levels... > from > /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in > `execute'' > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 > from /usr/bin/cucumber:19:in `load'' > from /usr/bin/cucumber:19 >Just a gut feeling but try: cucumber -r features/steps/ -r features/support/env.rb features/plain/user_home_page.feature> Any idea why rspec code is being called here? I did discover that if I > uninstall cucumber 0.2.3 and try version 0.1.16, then the above > command line works as does using the profile. I''m not sure if this > indicates a bug in 0.2.3. > > Mark Lynn > Sabado Technologies > > > On Mar 31, 2009, at 9:26 AM, Joseph Wilk wrote: > >> Mark Lynn wrote: >>> I am using Cucumber 0.2.3 and am having problems running a single >>> feature. In particular, the cucumber Textmate bundle was not working >>> so I traced it back and discovered that I could not run single files >>> or features from the command line either. My setup has the following >>> line in cucumber.yml >>> >>> default: -r features/support/env.rb -r features/support/plain.rb -r >>> features/steps features/plain >>> >>> When I run just plain cucumber from the command line, all my >>> scenarios run and all features pass. However, if I try to run the >>> command >>> >>> cucumber -r features/support/env.rb -r features/support/plain.rb -r >>> features/steps features/plain >>> >>> OR >>> >>> cucumber -r features/support/env.rb -r features/support/plain.rb -r >>> features/steps features/plain/login.feature >>> >>> I get >>> >>> Failed to load features/support/env.rb from >>> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >>> `polyglot_original_require'' >>> from >>> /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in >>> `require'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:144:in >>> `invoke_requires'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in >>> `each'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:143:in >>> `invoke_requires'' >>> from >>> /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/option_parser.rb:104:in >>> `initialize'' >>> from >>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in >>> `call'' >>> from >>> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1291:in >>> `parse_in_order'' >>> ... 31 levels... >>> from >>> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in >>> `execute'' >>> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 >>> from /usr/bin/cucumber:19:in `load'' >>> from /usr/bin/cucumber:19 >>> >>> I''m assuming the repeated use of the -r flag is not acceptable, but >>> I need to specify multiple files. >> >> Cucumber will accept multiple -r or --require. It simply pushes all >> the requires onto a stack and requires them all. >> >> Looks like this is a polygot problem. Aslak recently forked and >> patched a copy of Treetop to avoid the dependency on this: >> >> git://github.com/aslakhellesoy/treetop.git >> >> I would suggest you try and install treetop from this source and see >> if that fixes the problem. >> >> HTH >> -- >> Joseph Wilk >> http://blog.josephwilk.net >> >>> How can I get this to work from the command line so I can also use >>> it in Textmate? >>> >>> - Mark >>> >>> Mark Lynn >>> Sabado Technologies >>> >>> >>> >>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Mark Lynn
2009-Mar-31 17:33 UTC
[rspec-users] [Cucumber] Running single feature from command line
Aslak, Thanks! It is nice to at least know where the problem is. I am actually using Cucumber in a Merb project so the Rails solution does not help, but I will look for another workaround and post if I find something. Mark Lynn Sabado Technologies On Mar 31, 2009, at 11:56 AM, aslak hellesoy wrote:> > > On Tue, Mar 31, 2009 at 5:22 PM, Mark Lynn <mark at sabado.com> wrote: > > When I use Aslak''s version of Treetop as Joseph suggested, this does > get rid of the polyglot error. However, I still get the following > when running from the command line: > > $ cucumber -r features/steps -r features/support/env.rb features/ > plain/user_home_page.feature > > /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'': no such file to load -- features/steps > (LoadError) > Failed to load features/support/env.rb from /Library/Ruby/Site/1.8/ > rubygems/custom_require.rb:31:in `require'' > > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:144:in `invoke_requires'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:143:in `each'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:143:in `invoke_requires'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:104:in `initialize'' > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/lib/ruby/1.8/optparse.rb:1291:in `call'' > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/lib/ruby/1.8/optparse.rb:1291:in `parse_in_order'' > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ > usr/lib/ruby/1.8/optparse.rb:1247:in `catch'' > ... 26 levels... > > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/ > cucumber/cli/main.rb:20:in `execute'' > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 > from /usr/bin/cucumber:19:in `load'' > from /usr/bin/cucumber:19 > > Any idea why rspec code is being called here? I did discover that if > I uninstall cucumber 0.2.3 and try version 0.1.16, then the above > command line works as does using the profile. I''m not sure if this > indicates a bug in 0.2.3. > > It''s actually a bug in RSpec that is only triggered in Cucumber 0.2 > (bin/cucumber used to consume ARGV, but now leaves it intact, and > RSpec blows up). > > https://rspec.lighthouseapp.com/projects/16211/tickets/200 > https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/767 > > Do you have a Rails app? See how Chris Flipse got around the error > in the #200 ticket. > > Aslak > > > > Mark Lynn > Sabado Technologies > > > On Mar 31, 2009, at 9:26 AM, Joseph Wilk wrote: > > Mark Lynn wrote: > I am using Cucumber 0.2.3 and am having problems running a single > feature. In particular, the cucumber Textmate bundle was not working > so I traced it back and discovered that I could not run single files > or features from the command line either. My setup has the following > line in cucumber.yml > > default: -r features/support/env.rb -r features/support/plain.rb -r > features/steps features/plain > > When I run just plain cucumber from the command line, all my > scenarios run and all features pass. However, if I try to run the > command > > cucumber -r features/support/env.rb -r features/support/plain.rb -r > features/steps features/plain > > OR > > cucumber -r features/support/env.rb -r features/support/plain.rb -r > features/steps features/plain/login.feature > > I get > > Failed to load features/support/env.rb from /Library/Ruby/Site/ > 1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'' > from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb: > 54:in `require'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:144:in `invoke_requires'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:143:in `each'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:143:in `invoke_requires'' > from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ > option_parser.rb:104:in `initialize'' > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ > lib/ruby/1.8/optparse.rb:1291:in `call'' > from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/ > lib/ruby/1.8/optparse.rb:1291:in `parse_in_order'' > ... 31 levels... > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/ > cucumber/cli/main.rb:20:in `execute'' > from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 > from /usr/bin/cucumber:19:in `load'' > from /usr/bin/cucumber:19 > > I''m assuming the repeated use of the -r flag is not acceptable, but > I need to specify multiple files. > > Cucumber will accept multiple -r or --require. It simply pushes all > the requires onto a stack and requires them all. > > Looks like this is a polygot problem. Aslak recently forked and > patched a copy of Treetop to avoid the dependency on this: > > git://github.com/aslakhellesoy/treetop.git > > I would suggest you try and install treetop from this source and see > if that fixes the problem. > > HTH > -- > Joseph Wilk > http://blog.josephwilk.net > > How can I get this to work from the command line so I can also use > it in Textmate? > > - Mark > > Mark Lynn > Sabado Technologies > > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090331/07f6454f/attachment-0001.html>
Mark Lynn
2009-Mar-31 21:12 UTC
[rspec-users] [Cucumber] Running single feature from command line
FYI: I did confirm the problem was the RSpec issue Aslak mentioned. I did not see a nice solution without messing around with the RSpec gem, and am I familiar enough with the RSpec code to patch it at this time. I ended up throwing a constant in my support/env.rb file and testing for this in the RSpec spec/runner.rb file. Sloppy workaround, but I needed to move on. Thanks to Joseph and Aslak for their comments. Mark Lynn Sabado Technologies On Mar 31, 2009, at 1:33 PM, Mark Lynn wrote:> > Aslak, > > Thanks! It is nice to at least know where the problem is. I am > actually using Cucumber in a Merb project so the Rails solution does > not help, but I will look for another workaround and post if I find > something. > > Mark Lynn > Sabado Technologies > > > On Mar 31, 2009, at 11:56 AM, aslak hellesoy wrote: > >> >> >> On Tue, Mar 31, 2009 at 5:22 PM, Mark Lynn <mark at sabado.com> wrote: >> >> When I use Aslak''s version of Treetop as Joseph suggested, this >> does get rid of the polyglot error. However, I still get the >> following when running from the command line: >> >> $ cucumber -r features/steps -r features/support/env.rb features/ >> plain/user_home_page.feature >> >> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require'': no such file to load -- features/steps >> (LoadError) >> Failed to load features/support/env.rb from /Library/Ruby/Site/1.8/ >> rubygems/custom_require.rb:31:in `require'' >> >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:144:in `invoke_requires'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:143:in `each'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:143:in `invoke_requires'' >> from /Library/Ruby/Gems/1.8/gems/rspec-1.2.2/lib/spec/runner/ >> option_parser.rb:104:in `initialize'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/lib/ruby/1.8/optparse.rb:1291:in `call'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/lib/ruby/1.8/optparse.rb:1291:in `parse_in_order'' >> from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ >> usr/lib/ruby/1.8/optparse.rb:1247:in `catch'' >> ... 26 levels... >> >> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/ >> cucumber/cli/main.rb:20:in `execute'' >> from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6 >> from /usr/bin/cucumber:19:in `load'' >> from /usr/bin/cucumber:19 >> >> Any idea why rspec code is being called here? I did discover that >> if I uninstall cucumber 0.2.3 and try version 0.1.16, then the >> above command line works as does using the profile. I''m not sure if >> this indicates a bug in 0.2.3. >> >> It''s actually a bug in RSpec that is only triggered in Cucumber 0.2 >> (bin/cucumber used to consume ARGV, but now leaves it intact, and >> RSpec blows up). >> >> https://rspec.lighthouseapp.com/projects/16211/tickets/200 >> https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/767 >> >> Do you have a Rails app? See how Chris Flipse got around the error >> in the #200 ticket. >> >> Aslak-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090331/f0a4b983/attachment-0001.html>