forked from mattheworiordan/capybara-screenshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
40 lines (30 loc) · 722 Bytes
/
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
require 'rubygems'
require 'bundler/setup'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
rspec_rake_task = RSpec::Core::RakeTask.new(:spec)
task default: [:spec]
def target_gem
gem_file = ENV['BUNDLE_GEMFILE'] || ''
targets = %w(cucumber spinach rspec)
target = gem_file.match(/(#{targets.join('|')})/)
if target && targets.include?(target[1])
target[1].to_sym
else
[]
end
end
namespace :travis do
task :ci => target_gem do
Rake::Task['spec'].invoke
end
task :cucumber do
rspec_rake_task.pattern = 'spec/cucumber'
end
task :spinach do
rspec_rake_task.pattern = 'spec/spinach'
end
task :rspec do
rspec_rake_task.pattern = 'spec/rspec'
end
end