voicemeeter-rb/test/minitest_helper.rb

28 lines
603 B
Ruby
Raw Normal View History

require "minitest/autorun"
require "voicemeeter"
class Test
2023-07-18 07:35:33 +01:00
class << self
attr_reader :vm, :data
end
2023-08-10 14:40:50 +01:00
@vm = Voicemeeter::Remote.new(ENV.fetch("KIND", "potato").to_sym)
2023-07-18 07:35:33 +01:00
vm.login
puts "Running #{vm.kind.name} tests"
2023-07-17 20:00:25 +01:00
TestMap = Data.define(:name, :phys_in, :virt_in, :phys_out, :virt_out, :button_lower, :button_higher, :vban_in, :vban_out)
2023-07-17 20:00:25 +01:00
@data = TestMap.new(
2023-07-18 07:35:33 +01:00
vm.kind.name,
vm.kind.phys_in - 1,
vm.kind.virt_in - 1,
vm.kind.phys_out - 1,
vm.kind.virt_out - 1,
2023-07-17 20:00:25 +01:00
0, 79,
2023-07-18 07:35:33 +01:00
vm.kind.vban[0] - 1,
vm.kind.vban[1] - 1
2023-07-17 20:00:25 +01:00
)
2023-07-18 07:35:33 +01:00
Minitest.after_run { vm.logout }
end