whitespace fix

load obs.yml instead
This commit is contained in:
onyx-and-iris 2023-07-19 15:10:38 +01:00
parent 799ae52b02
commit d9b054b108
3 changed files with 15 additions and 15 deletions

View File

@ -1,12 +1,12 @@
require "minitest" require "minitest"
require "minitest/autorun" require "minitest/autorun"
require "perfect_toml" require "yaml"
require_relative "../lib/obsws" require_relative "../lib/obsws"
class OBSWSTest < Minitest::Test class OBSWSTest < Minitest::Test
def self.before_run def self.before_run
conn = PerfectTOML.load_file("obs.toml", symbolize_names: true)[:connection] conn = YAML.load_file("obs.yml", symbolize_names: true)[:connection]
@@r_client = OBSWS::Requests::Client.new(**conn) @@r_client = OBSWS::Requests::Client.new(**conn)
@@r_client.create_scene("START_TEST") @@r_client.create_scene("START_TEST")

View File

@ -4,14 +4,14 @@ class AttrsTest < OBSWSTest
def test_get_version_attrs def test_get_version_attrs
resp = @@r_client.get_version resp = @@r_client.get_version
assert resp.attrs == assert resp.attrs ==
%w[ %w[
available_requests available_requests
obs_version obs_version
obs_web_socket_version obs_web_socket_version
platform platform
platform_description platform_description
rpc_version rpc_version
supported_image_formats supported_image_formats
] ]
end end
end end

View File

@ -30,9 +30,9 @@ class RequestTest < OBSWSTest
resp = @@r_client.get_stream_service_settings resp = @@r_client.get_stream_service_settings
assert resp.stream_service_type == "rtmp_common" assert resp.stream_service_type == "rtmp_common"
assert resp.stream_service_settings == assert resp.stream_service_settings ==
{ {
server: "rtmp://addressofrtmpserver", server: "rtmp://addressofrtmpserver",
key: "live_myvery_secretkey" key: "live_myvery_secretkey"
} }
end end
end end