-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (31 loc) · 1006 Bytes
/
Copy pathRakefile
File metadata and controls
39 lines (31 loc) · 1006 Bytes
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
# Rakefile tutorial: http://jasonseifer.com/2010/04/06/rake-tutorial
require 'rake'
require 'irb'
require 'fileutils'
require 'rake/testtask'
require 'ci/reporter/rake/minitest' # From: https://github.com/nicksieger/ci_reporter
desc "setup for ci reporter"
task :setup do
ci_reports_file = ENV['CI_REPORTS'] = "./test/reports"
puts "Ci reports are here:" + ci_reports_file
# folders
Dir.mkdir("test/logs") unless File.directory? "test/logs"
Dir.mkdir("test/reports") unless File.directory? "test/reports"
end
desc "clean out reports and logs"
task :clean do
Dir.mkdir("test/reports") unless File.directory? "test/reports"
Dir.mkdir("test/logs") unless File.directory? "test/logs"
end
desc 'Unit tests.'
Rake::TestTask.new(:test => ['ci:setup:minitest', 'setup']) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
t.warning = false
end
desc "interactive irb for testing"
task :default do
exec("irb -r ./lib/irb/bootstrap_irb.rb")
end