File: Rakefile

package info (click to toggle)
ruby-minitest-around 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 172 kB
  • sloc: ruby: 282; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download
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
44
45
46
47
48
49
50
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'cucumber/rake/task'

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

# RDoc
require 'rdoc/task'
RDoc::Task.new do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'mintest-around'
  rdoc.main     = 'README.md'
  rdoc.rdoc_files.include('README.md', 'LICENSE', 'lib/**/*.rb')
  rdoc.options << "--all"
  rdoc.options << "--markup markdown"
end