-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathRakefile
43 lines (34 loc) · 921 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
41
42
43
# frozen_string_literal: true
require 'bundler/setup'
require 'rspec/core/rake_task'
begin
require 'cucumber/rake/task'
rescue LoadError
# noop
end
Bundler::GemHelper.install_tasks
task :default => :test
desc 'Run RSpec and (if enabled and CUCUMBER!=false) cucumber tests'
task 'test' => 'spec'
RSpec::Core::RakeTask.new 'spec'
namespace 'spec' do
RSpec::Core::RakeTask.new 'wip' do |t|
t.rspec_opts = '--tag wip'
t.fail_on_error = false
end
RSpec::Core::RakeTask.new 'rcov' do |t|
t.rspec_opts = ['-r simplecov']
end
end
if defined? Cucumber::Rake::Task
Cucumber::Rake::Task.new 'cucumber' do |t|
t.fork = true
t.profile = 'default'
end
task 'test' => 'cucumber' if ENV['CUCUMBER'] != 'false'
end
desc 'Validate the gemspec'
task 'gemspec' do
gemspec = eval File.read(Dir['*.gemspec'].first) # rubocop:disable Security/Eval
puts 'gemspec valid' if gemspec.validate
end