mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 15:00:46 +00:00
move test tasks into namespace :t
add task :all
This commit is contained in:
parent
cc6db06c65
commit
6a60a9ab00
49
rakefile
49
rakefile
@ -3,32 +3,37 @@ require "rake/testtask"
|
|||||||
HERE = __dir__
|
HERE = __dir__
|
||||||
|
|
||||||
desc "Creates the base :test task"
|
desc "Creates the base :test task"
|
||||||
task :test_task_create do
|
Rake::TestTask.new do |t|
|
||||||
Rake::TestTask.new do |t|
|
t.pattern = "test/test_*.rb"
|
||||||
t.pattern = "test/test_*.rb"
|
end
|
||||||
|
|
||||||
|
namespace :t do
|
||||||
|
desc "Runs Voicemeeter basic tests"
|
||||||
|
task :basic do
|
||||||
|
ENV["KIND"] = "basic"
|
||||||
|
Rake::Task[:test].invoke
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Runs Voicemeeter banana tests"
|
||||||
|
task :banana do
|
||||||
|
ENV["KIND"] = "banana"
|
||||||
|
Rake::Task[:test].invoke
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Runs Voicemeeter potato tests"
|
||||||
|
task :potato do
|
||||||
|
ENV["KIND"] = "potato"
|
||||||
|
Rake::Task[:test].invoke
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Runs Voicemeeter basic tests"
|
task default: ["t:potato"]
|
||||||
task :test_basic do
|
task basic: ["t:basic"]
|
||||||
ENV["KIND"] = "basic"
|
task banana: ["t:banana"]
|
||||||
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
task potato: ["t:potato"]
|
||||||
|
task :all do
|
||||||
|
Rake.application.in_namespace(:t) { |namespace| namespace.tasks.each { |t| t.invoke and Rake::Task[:test].reenable } }
|
||||||
end
|
end
|
||||||
desc "Runs Voicemeeter banana tests"
|
|
||||||
task :test_banana do
|
|
||||||
ENV["KIND"] = "banana"
|
|
||||||
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
|
||||||
end
|
|
||||||
desc "Runs Voicemeeter potato tests"
|
|
||||||
task :test_potato do
|
|
||||||
ENV["KIND"] = "potato"
|
|
||||||
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
|
||||||
end
|
|
||||||
|
|
||||||
task default: :test_potato
|
|
||||||
task basic: :test_basic
|
|
||||||
task banana: :test_banana
|
|
||||||
task potato: :test_potato
|
|
||||||
|
|
||||||
namespace :e do
|
namespace :e do
|
||||||
desc "Runs the events example"
|
desc "Runs the events example"
|
||||||
|
Loading…
Reference in New Issue
Block a user