-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
40 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
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'cucumber/rake/task'
require 'bump/tasks'
desc 'Default: run unit tests.'
task :default => [:test, :"test:isolated", :features]
# Test
TEST_FILES = FileList.new('test/*_{test,spec}.rb')
desc "Run all tests"
task :test do
TEST_FILES.each do |test_file|
sh "bundle", "exec", "rake", "test:isolated", "TEST=#{test_file}"
end
end
require 'rake/testtask'
Rake::TestTask.new(:"test:isolated") do |test|
test.test_files = TEST_FILES
test.libs << 'test'
test.verbose = true
test.warning = true
end
# Examples
EXAMPLES = FileList["examples/*.rb"]
desc "Run all examples"
task :"test:examples" do
EXAMPLES.each do |example|
sh "bundle", "exec", "ruby", example
end
end
# Features
Cucumber::Rake::Task.new(:features) do |t|
skip_tags = %w[rspec todo].map { |tag| "--tag ~@#{tag}" }.join(" ")
t.cucumber_opts = "features #{skip_tags}"
end