From 31583af7821c03705bdb3e566e6d746356ba9245 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 7 Jan 2025 23:59:24 -0800 Subject: [PATCH] fix warnings --- lib/appium_lib_core/driver.rb | 2 +- test/unit/driver_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/appium_lib_core/driver.rb b/lib/appium_lib_core/driver.rb index 54a95bb9..68282940 100644 --- a/lib/appium_lib_core/driver.rb +++ b/lib/appium_lib_core/driver.rb @@ -622,7 +622,7 @@ def get_app def set_app_path # FIXME: maybe `:app` should check `app` as well. return unless @caps && get_app && !get_app.empty? - return if get_app =~ URI::DEFAULT_PARSER.make_regexp + return if get_app =~ URI::RFC2396_PARSER.make_regexp app_path = File.expand_path(get_app) @caps['app'] = if File.exist? app_path diff --git a/test/unit/driver_test.rb b/test/unit/driver_test.rb index 9bfae767..5fe0fbf6 100644 --- a/test/unit/driver_test.rb +++ b/test/unit/driver_test.rb @@ -49,7 +49,7 @@ def test_with_caps_and_appium_lib opts = { 'caps' => { 'automationName': 'xcuitest' }, appium_lib: {} } driver = ExampleDriver.new(opts) refute_nil driver - assert_equal driver.core.caps[:automationName], nil + assert_nil driver.core.caps[:automationName] end def test_verify_appium_core_base_capabilities_create_capabilities