2022-10-22 22:30:40 +01:00
|
|
|
require "minitest"
|
|
|
|
require "minitest/autorun"
|
2023-07-19 15:10:38 +01:00
|
|
|
require "yaml"
|
2022-10-22 22:30:40 +01:00
|
|
|
|
|
|
|
require_relative "../lib/obsws"
|
|
|
|
|
|
|
|
class OBSWSTest < Minitest::Test
|
2023-07-19 15:24:15 +01:00
|
|
|
class << self
|
|
|
|
attr_reader :r_client
|
|
|
|
end
|
|
|
|
|
2022-10-22 22:30:40 +01:00
|
|
|
def self.before_run
|
2023-07-19 15:10:38 +01:00
|
|
|
conn = YAML.load_file("obs.yml", symbolize_names: true)[:connection]
|
2023-07-19 15:24:15 +01:00
|
|
|
@r_client = OBSWS::Requests::Client.new(**conn)
|
2022-10-22 22:30:40 +01:00
|
|
|
|
2023-07-19 15:24:15 +01:00
|
|
|
r_client.create_scene("START_TEST")
|
|
|
|
r_client.create_scene("BRB_TEST")
|
|
|
|
r_client.create_scene("END_TEST")
|
2022-10-22 22:30:40 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
before_run
|
|
|
|
|
|
|
|
def setup
|
|
|
|
end
|
|
|
|
|
|
|
|
def teardown
|
|
|
|
end
|
|
|
|
|
|
|
|
Minitest.after_run do
|
2023-07-19 15:24:15 +01:00
|
|
|
r_client.remove_scene("START_TEST")
|
|
|
|
r_client.remove_scene("BRB_TEST")
|
|
|
|
r_client.remove_scene("END_TEST")
|
|
|
|
r_client.close
|
2022-10-22 22:30:40 +01:00
|
|
|
end
|
|
|
|
end
|