mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
test tasks for each kind added
defaults to potato event tasks moved into :e namespace
This commit is contained in:
parent
2cf8d105b4
commit
5789b39826
32
rakefile
32
rakefile
@ -2,21 +2,51 @@ require "rake/testtask"
|
|||||||
|
|
||||||
HERE = __dir__
|
HERE = __dir__
|
||||||
|
|
||||||
|
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
|
end
|
||||||
|
end
|
||||||
|
|
||||||
task default: :test
|
desc "Runs Voicemeeter basic tests"
|
||||||
|
task :test_basic do
|
||||||
|
ENV["KIND"] = "basic"
|
||||||
|
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
||||||
|
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
|
||||||
|
desc "Runs the events example"
|
||||||
task :events do
|
task :events do
|
||||||
filepath = File.join(HERE, "examples", "events", "main.rb")
|
filepath = File.join(HERE, "examples", "events", "main.rb")
|
||||||
ruby filepath
|
ruby filepath
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Runs the midi example"
|
||||||
task :midi do
|
task :midi do
|
||||||
filepath = File.join(HERE, "examples", "midi", "main.rb")
|
filepath = File.join(HERE, "examples", "midi", "main.rb")
|
||||||
ruby filepath
|
ruby filepath
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Runs the obs example"
|
||||||
task :obs do
|
task :obs do
|
||||||
targetdir = File.join(HERE, "examples", "obs")
|
targetdir = File.join(HERE, "examples", "obs")
|
||||||
Dir.chdir(targetdir)
|
Dir.chdir(targetdir)
|
||||||
ruby File.join(targetdir, "main.rb")
|
ruby File.join(targetdir, "main.rb")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user