spec/teabag/drivers/selenium_driver_spec.rb in teabag-0.4.6 vs spec/teabag/drivers/selenium_driver_spec.rb in teabag-0.5.0

- old
+ new

@@ -29,11 +29,11 @@ Selenium::WebDriver.should_receive(:for).with(:firefox) subject.run_specs(:default, "_url_") end it "navigates to the correct url" do - @navigate.should_receive(:to).with("_url_?reporter=Console") + @navigate.should_receive(:to).with("_url_&reporter=Console") subject.run_specs(:default, "_url_") end it "ensures quit is called on the driver" do @driver.should_receive(:quit) @@ -47,10 +47,10 @@ it "waits until it's done (checking Teabag.finished) and processes each line" do @block = nil @wait.should_receive(:until) { |&b| @block = b } @driver.should_receive(:execute_script).with("return window.Teabag && window.Teabag.finished").and_return(true) - @driver.should_receive(:execute_script).with("return Teabag.getMessages()").and_return(["_line_"]) + @driver.should_receive(:execute_script).with("return window.Teabag && window.Teabag.getMessages() || []").and_return(["_line_"]) Teabag::Runner.any_instance.should_receive(:process).with("_line_\n") subject.run_specs(:default, "_url_") @block.call end