Test for AsynchronousCloseException text when done running

This commit is contained in:
Thomas Walpole 2017-05-16 17:25:37 -07:00
parent da13973bae
commit dc1a151664
3 changed files with 17 additions and 0 deletions

View File

@ -29,6 +29,8 @@ matrix:
env: QMAKE=/usr/lib/x86_64-linux-gnu/qt4/bin/qmake
- rvm: 2.3.3
gemfile: gemfiles/master.gemfile
- rvm: jruby-9.1.8.0
gemfile: Gemfile
allow_failures:
- gemfile: gemfiles/master.gemfile
gemfile:

9
spec/fixtures/exit_text.rb vendored Normal file
View File

@ -0,0 +1,9 @@
require 'spec_helper'
# require 'selenium-webdriver'
RSpec.describe Capybara::Webkit::Driver do
it "should exit with a zero exit status" do
browser = Capybara::Webkit::Driver.new(TestApp).browser
expect(true).to eq(true)
end
end

View File

@ -25,6 +25,12 @@ describe Capybara::Webkit::Connection do
end
end
it "shouldn't output extraneous warnings when exiting", skip_on_windows: true do
output_str, status = Open3.capture2e("rspec spec/fixtures/exit_text.rb")
expect(status.exitstatus).to eq(0)
expect(output_str).not_to include("AsynchronousCloseException")
end
it "raises an error if the server has stopped", skip_on_windows: true do
path = "false"
stub_const("Capybara::Webkit::Server::SERVER_PATH", path)