diff --git a/Gemfile b/Gemfile index 68f3992..58bee40 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source "http://rubygems.org" +source "https://rubygems.org" gem "minitest" gem "rake" gem "json" diff --git a/Gemfile.lock b/Gemfile.lock index 352171b..6083e13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,19 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - json (1.8.3) - minitest (5.8.4) - rake (12.3.3) + drb (2.2.3) + json (2.21.2) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) + prism (1.9.0) + rake (13.4.2) PLATFORMS + aarch64-linux + arm64-darwin-24 ruby + x86_64-linux DEPENDENCIES json @@ -14,4 +21,4 @@ DEPENDENCIES rake BUNDLED WITH - 1.11.2 + 2.7.1 diff --git a/test/browserstack-local-test.rb b/test/browserstack-local-test.rb index 2c6218b..51a55dd 100644 --- a/test/browserstack-local-test.rb +++ b/test/browserstack-local-test.rb @@ -8,17 +8,28 @@ def setup @bs_local = BrowserStack::Local.new end + # The tests below actually start the BrowserStackLocal binary and open a + # tunnel, so they need a valid BROWSERSTACK_ACCESS_KEY and network access. + # Skip them (instead of erroring) when no key is available so the rest of + # the suite stays green in credential-less environments such as CI. + def skip_without_credentials + skip 'requires BROWSERSTACK_ACCESS_KEY (live integration test)' if ENV['BROWSERSTACK_ACCESS_KEY'].to_s.empty? + end + def test_check_pid + skip_without_credentials @bs_local.start refute_nil @bs_local.pid, 0 end def test_is_running + skip_without_credentials @bs_local.start assert_equal true, @bs_local.isRunning end def test_multiple_binary + skip_without_credentials @bs_local.start bs_local_2 = BrowserStack::Local.new second_log_file = File.join(Dir.pwd, 'local2.log')