forked from teamcapybara/capybara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (36 loc) · 1.15 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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]
end
RSpec::Core::RakeTask.new(:spec_with_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.rb,_spec_chrome.rb}'
end
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
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]