File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ def debug_url
272272 devtools_frontend_path = response [ 0 ] &.[]( "devtoolsFrontendUrl" )
273273 raise "Could not generate debug url for remote debugging session" unless devtools_frontend_path
274274
275- build_remote_debug_url path : devtools_frontend_path
275+ build_remote_debug_url ( path : devtools_frontend_path )
276276 end
277277
278278 def debug ( binding = nil )
Original file line number Diff line number Diff line change 33describe Capybara ::Cuprite ::Driver do
44 describe "options" do
55 it "sets the remote-allow-origins option" do
6- driver = described_class . new nil
6+ driver = described_class . new ( nil )
77
88 expect ( driver . browser . options . to_h ) . to include ( "remote-allow-origins" : "*" )
99 end
3131
3232 describe "debug_url" do
3333 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 } )
3535 driver . browser # initialize browser before stubbing Net::HTTP as it also calls it
36- uri = instance_double URI
36+ uri = instance_double ( URI )
3737
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"}]) )
4040
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" )
4242 end
4343 end
4444
You can’t perform that action at this time.
0 commit comments