Skip to content
Permalink
Browse files

Define rake subtests

  • Loading branch information
lmrodriguezr committed Mar 6, 2020
1 parent ed19470 commit 872a0842bd489961053201b73426f5f3d2e9f74b
Showing with 19 additions and 9 deletions.
  1. +19 −9 Rakefile
@@ -1,18 +1,28 @@
require "rake/testtask"
require 'rake/testtask'

SOURCES = FileList["lib/**/*.rb"]
SOURCES = FileList['lib/**/*.rb']

desc "Default Task"
task :default => "test:all"
desc 'Default Task'
task :default => 'test:all'

desc "Default tests"
task :test => "test:all"
desc 'Default tests'
task :test => 'test:all'

namespace :test do
desc "All tests"
desc 'All tests'
Rake::TestTask.new(:all) do |t|
t.libs << "test"
t.pattern = "test/*_test.rb"
t.libs << 'test'
t.pattern = 'test/*_test.rb'
t.verbose = true
end

FileList['test/*_test.rb'].each do |i|
b = File.basename(i, '_test.rb')
desc "Test #{b}"
Rake::TestTask.new(:"#{b}") do |t|
t.libs << 'test'
t.pattern = i
t.verbose = true
end
end
end

0 comments on commit 872a084

Please sign in to comment.
You can’t perform that action at this time.