2010-09-17 19:56:32 -04:00
|
|
|
require 'rubygems'
|
2010-09-17 20:23:13 -04:00
|
|
|
require 'rspec/core/rake_task'
|
2012-01-26 08:58:25 -05:00
|
|
|
require 'cucumber/rake/task'
|
2010-09-17 19:56:32 -04:00
|
|
|
require 'yard'
|
|
|
|
|
|
|
|
desc "Run all examples"
|
2010-11-21 08:37:36 -05:00
|
|
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
|
|
t.rspec_opts = %w[--color]
|
|
|
|
end
|
2013-02-25 14:13:03 -05:00
|
|
|
|
|
|
|
RSpec::Core::RakeTask.new(:spec_with_chrome) do |t|
|
|
|
|
t.rspec_opts = %w[--color]
|
2013-11-19 16:53:06 -05:00
|
|
|
#jruby buffers the progress formatter so travis doesnt see output often enough
|
|
|
|
t.rspec_opts << '--format documentation' if RUBY_PLATFORM=='java'
|
2013-02-25 14:13:03 -05:00
|
|
|
t.pattern = './spec{,/*/**}/*{_spec.rb,_spec_chrome.rb}'
|
|
|
|
end
|
2010-09-17 19:56:32 -04:00
|
|
|
|
|
|
|
YARD::Rake::YardocTask.new do |t|
|
2012-01-06 13:15:33 -05:00
|
|
|
t.files = ['lib/**/*.rb']
|
2010-09-17 19:56:32 -04:00
|
|
|
#t.options = ['--any', '--extra', '--opts'] # optional
|
|
|
|
end
|
|
|
|
|
2012-01-26 08:58:25 -05:00
|
|
|
Cucumber::Rake::Task.new(:cucumber) do |task|
|
|
|
|
task.cucumber_opts = ['--format=progress', 'features']
|
|
|
|
end
|
|
|
|
|
2013-02-25 14:13:03 -05:00
|
|
|
task :travis => [:spec_with_chrome, :cucumber]
|
|
|
|
|
2012-01-26 08:58:25 -05:00
|
|
|
task :default => [:spec, :cucumber]
|