1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/Rakefile

46 lines
1.3 KiB
Text
Raw Normal View History

require 'rubygems'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
require 'yard'
desc "Run all examples"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
# When we drop RSpec 2.x support we can rename spec_chrome.rb and implement this properly
# t.exclude_pattern = './spec/*{_chrome_spec.rb}'
end
2014-03-31 18:10:27 -04:00
RSpec::Core::RakeTask.new(:all) do |t|
t.rspec_opts = %w[--color]
2014-03-31 18:10:27 -04:00
# jruby buffers the progress formatter so travis doesn't see output often enough
t.rspec_opts << '--format documentation' if RUBY_PLATFORM=='java'
t.pattern = './spec{,/*/**}/*{_spec.rb,_spec_chrome.rb}'
end
2015-05-21 14:00:36 -04:00
RSpec::Core::RakeTask.new(:spec_chrome) do |t|
t.rspec_opts = %w[--color]
# jruby buffers the progress formatter so travis doesn't see output often enough
t.rspec_opts << '--format documentation' if RUBY_PLATFORM=='java'
t.pattern = './spec/*{_spec_chrome.rb}'
end
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
t.options = %w(--markup=markdown)
end
Cucumber::Rake::Task.new(:cucumber) do |task|
task.cucumber_opts = ['--format=progress', 'features']
end
2015-05-21 14:00:36 -04:00
task :travis do |t|
if ENV['CAPYBARA_CHROME']
Rake::Task[:spec_chrome].invoke
else
Rake::Task[:spec].invoke
Rake::Task[:cucumber].invoke
end
end
task :default => [:spec, :cucumber]