Skip to content

Commit

Permalink
Use coveralls for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Jun 17, 2015
1 parent f6406ed commit 3a899b8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service_name: travis-ci
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: ruby
cache: bundler
rvm:
- 1.9.3
- 2.0.0
Expand All @@ -8,3 +9,6 @@ rvm:
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

script:
- "bundle exec rake test_with_coveralls"
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ source "http://rubygems.org"

# adding rake so travis-ci will build properly
gem 'rake'
gem 'fuubar'
gem 'fuubar-cucumber'
gem 'fuubar', '>= 2.0.0'
gem 'fuubar-cucumber', '>= 0.0.22'
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
gem 'growl'
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'net-http-persistent'
gem 'coveralls', require: false


gemspec
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ require 'bundler'
require 'rspec/core/rake_task'
require 'cucumber'
require 'cucumber/rake/task'
require 'coveralls/rake/task'

Coveralls::RakeTask.new
Bundler::GemHelper.install_tasks

RSpec::Core::RakeTask.new(:spec) do |spec|
Expand Down Expand Up @@ -32,4 +34,6 @@ task :lib do
$LOAD_PATH.unshift(File.expand_path("lib", File.dirname(__FILE__)))
end

task :default => :test
task :test_with_coveralls => [:test, 'coveralls:push']

task :default => :test_with_coveralls
1 change: 1 addition & 0 deletions page-object.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'cucumber', '>= 1.3.0'
s.add_development_dependency 'yard', '>= 0.7.2'
s.add_development_dependency 'rack', '>= 1.0'
s.add_development_dependency 'coveralls', '~> 0.8.1'

end
9 changes: 3 additions & 6 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

if ENV['coverage']
raise "simplecov only works on Ruby 1.9" unless RUBY_VERSION =~ /^1\.9/

require 'simplecov'
SimpleCov.start { add_filter "spec/" }
end
require 'simplecov'
require 'coveralls'
SimpleCov.start { add_filter 'spec/' }

require 'rspec'
require 'watir-webdriver'
Expand Down

0 comments on commit 3a899b8

Please sign in to comment.