On Thu, Jun 07, 2012 at 05:06:48PM -0400, Jason Guiditta wrote:
---
src/config/cucumber.yml | 1 +
src/lib/tasks/custom_cucumber.rake | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 src/lib/tasks/custom_cucumber.rake
diff --git a/src/config/cucumber.yml b/src/config/cucumber.yml
index 19b288d..49823b3 100644
--- a/src/config/cucumber.yml
+++ b/src/config/cucumber.yml
@@ -6,3 +6,4 @@ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] ||
'pretty'} --strict --tags ~@wip
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
+junit: --format junit --out results/ features
diff --git a/src/lib/tasks/custom_cucumber.rake b/src/lib/tasks/custom_cucumber.rake
new file mode 100644
index 0000000..d3bf847
--- /dev/null
+++ b/src/lib/tasks/custom_cucumber.rake
@@ -0,0 +1,16 @@
+begin
+ require 'cucumber/rake/task'
+
+ namespace :cucumber do
+ Cucumber::Rake::Task.new({:junit =>
['db:test:prepare','db:seed']}, 'Run features via junit') do |t|
+ t.fork = true # You may get faster startup if you set this to false
+ t.profile = 'junit'
+ end
+ end
+
+rescue LoadError
+ desc 'cucumber rake task not available (cucumber not installed)'
+ task :cucumber do
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem
or plugin'
+ end
+end
--
1.7.7.6
ACK. Works for me. I get results directory with xml files therein. Pushing this.
Steve