Enable Coveralls on Travis

This commit is contained in:
Thomas Walpole 2019-04-25 00:39:37 -07:00
parent 0ca3d58f9c
commit 9a38e93470
6 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,8 @@
language: ruby
sudo: required
dist: trusty
notifications:
webhooks: https://coveralls.io/webhook
services:
- docker
rvm:

View File

@ -36,6 +36,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('xpath', ['~>3.2'])
s.add_development_dependency('byebug') unless RUBY_PLATFORM == 'java'
s.add_development_dependency('coveralls')
s.add_development_dependency('cucumber', ['>= 2.3.0'])
s.add_development_dependency('erubi') # dependency specification needed by rbx
s.add_development_dependency('irb')

View File

@ -153,7 +153,9 @@ module Capybara
# causes a concurrency issue with network requests here
# https://github.com/jruby/jruby/issues/4212
if (RUBY_PLATFORM == 'java') && (Gem::Version.new(JRUBY_VERSION) < Gem::Version.new('9.2.8.0'))
# :nocov:
@elements.select(&block).to_enum # non-lazy evaluation
# :nocov:
else
@elements.lazy.select(&block)
end

View File

@ -21,6 +21,7 @@ module Capybara
end
if RUBY_ENGINE == 'jruby'
# :nocov:
module Capybara::DSL
class <<self
remove_method :included
@ -43,6 +44,7 @@ if RUBY_ENGINE == 'jruby'
end
end
end
# :nocov:
else
module Capybara::DSLRSpecProxyInstaller
module ClassMethods

View File

@ -124,6 +124,7 @@ class MinitestSpecTest < Minitest::Spec
it 'supports style expectations' do
skip "Rack test doesn't support style" if Capybara.current_driver == :rack_test
visit('/with_html')
find(:css, '#second').must_have_style('display' => 'inline') # deprecated
find(:css, '#second').must_match_style('display' => 'inline')
end
end

View File

@ -1,9 +1,16 @@
# frozen_string_literal: true
require 'rspec/expectations'
require 'capybara/spec/spec_helper'
require 'webdrivers' if ENV['CI']
require 'selenium_statistics'
if ENV['CI']
require 'coveralls'
Coveralls.wear! do
add_filter '/lib/capybara/driver/'
add_filter '/lib/capybara/registrations/'
end
end
require 'capybara/spec/spec_helper'
module Capybara
module SpecHelper