buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duncan McGregor <dun...@oneeyedmen.com>
Subject Buildr and Cucumber - classpath
Date Tue, 22 Jun 2010 12:45:23 GMT
Thanks for getting me upright, now I'm trying to walk...

I can't see how to specify the classpath to cucumber.

I've tried passing through cucumber_opts

  desc "Cucumber tests"
  Cucumber::Rake::Task.new(:features_test) do |t|
    t.cucumber_opts = "-J-cp #{pathify(test.dependencies)} src/features"
  end

=> invalid option: -J-cp (OptionParser::InvalidOption)
/usr/local/jruby/lib/ruby/1.8/optparse.rb:1451:in `complete'

and directly invocation

  task :run_task do
    puts `jruby -J-cp #{pathify(test.dependencies)} -S cucumber src/features`
  end

=> jruby: unknown option -J-cp

where 

def pathify(specs)
  Buildr.artifacts(specs).map(&:name).join(File::PATH_SEPARATOR)
end

These may or may not both be symptoms of the same inability to set the classpath on jruby.

What should I be aiming for here? The cucumber tests will be starting and stopping a Swing
app, so I suppose that I need to fork the test running and fail the build depending on the
exit status...?

Cheers

Duncan
Mime
View raw message