Permalink
Browse files

Load spinach on demand.

  • Loading branch information...
1 parent 44e1d7b commit 66b6a79446ecda9ee42d5dcf660abb27a5873ef8 @spraints committed Jul 17, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/ci/reporter/rake/spinach.rb
@@ -1,13 +1,19 @@
-#require File.expand_path('../utils', __FILE__)
-
namespace :ci do
namespace :setup do
task :spinach_report_cleanup do
rm_rf ENV["CI_REPORTS"] || "features/reports"
end
task :spinach => :spinach_report_cleanup do
- # ???
+ loader = File.expand_path('prepare_ci_reporter.rb', ENV["SPINACH_SUPPORT_PATH"] || 'features/support')
+ if !File.exist? loader
+ File.open(loader, 'w') do |f|
+ f.puts "require 'ci/reporter/rake/spinach_loader'"
+ end
+ at_exit do
+ File.unlink loader
+ end
+ end
end
end
end

0 comments on commit 66b6a79

Please sign in to comment.