File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ def debug_url
272
272
devtools_frontend_path = response [ 0 ] &.[]( "devtoolsFrontendUrl" )
273
273
raise "Could not generate debug url for remote debugging session" unless devtools_frontend_path
274
274
275
- build_remote_debug_url path : devtools_frontend_path
275
+ build_remote_debug_url ( path : devtools_frontend_path )
276
276
end
277
277
278
278
def debug ( binding = nil )
Original file line number Diff line number Diff line change 3
3
describe Capybara ::Cuprite ::Driver do
4
4
describe "options" do
5
5
it "sets the remote-allow-origins option" do
6
- driver = described_class . new nil
6
+ driver = described_class . new ( nil )
7
7
8
8
expect ( driver . browser . options . to_h ) . to include ( "remote-allow-origins" : "*" )
9
9
end
31
31
32
32
describe "debug_url" do
33
33
it "parses the devtools frontend url correctly" do
34
- driver = described_class . new nil , { port : 12345 }
34
+ driver = described_class . new ( nil , { port : 12_345 } )
35
35
driver . browser # initialize browser before stubbing Net::HTTP as it also calls it
36
- uri = instance_double URI
36
+ uri = instance_double ( URI )
37
37
38
- allow ( driver ) . to receive ( :URI ) . with ( "http://127.0.0.1:12345/json" ) . and_return uri
39
- allow ( Net ::HTTP ) . to receive ( :get ) . with ( uri ) . and_return "[{ \ " devtoolsFrontendUrl\" : \ " /works\ " }]"
38
+ allow ( driver ) . to receive ( :URI ) . with ( "http://127.0.0.1:12345/json" ) . and_return ( uri )
39
+ allow ( Net ::HTTP ) . to receive ( :get ) . with ( uri ) . and_return ( %([{ "devtoolsFrontendUrl": "/works"}]) )
40
40
41
- expect ( driver . debug_url ) . to eq "http://127.0.0.1:12345/works"
41
+ expect ( driver . debug_url ) . to eq ( "http://127.0.0.1:12345/works" )
42
42
end
43
43
end
44
44
You can’t perform that action at this time.
0 commit comments