Skip to content

Commit 198cbc5

Browse files
committed
Fix missing variable and unique local identifiers
1 parent 677a308 commit 198cbc5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/browserstack/local.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def start_command
135135

136136
def start_command_args
137137
args = [@binary_path, "-d", "start", "-logFile", @logfile, @key, @folder_flag, @folder_path, @force_local_flag]
138-
args += ["-localIdentifier", local_identifier_flag] if @local_identifier_flag
138+
args += ["-localIdentifier", @local_identifier_flag] if @local_identifier_flag
139139
args += [@only_flag, @only_automate_flag]
140140
args += ["-proxyHost", @proxy_host] if @proxy_host
141141
args += ["-proxyPort", @proxy_port] if @proxy_port

test/browserstack-local-test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'rubygems'
2+
require 'securerandom'
23
require 'minitest'
34
require 'minitest/autorun'
45
require 'browserstack/local'
@@ -9,12 +10,12 @@ def setup
910
end
1011

1112
def test_check_pid
12-
@bs_local.start
13+
@bs_local.start({"localIdentifier" => SecureRandom.hex})
1314
refute_nil @bs_local.pid, 0
1415
end
1516

1617
def test_is_running
17-
@bs_local.start
18+
@bs_local.start({"localIdentifier" => SecureRandom.hex})
1819
assert_equal true, @bs_local.isRunning
1920
end
2021

0 commit comments

Comments
 (0)