Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Specs] Refine support for coverage analysis

  • Loading branch information...
commit d06394333c01e61b7250dcf8d3d456ee63aa2673 1 parent 8b7e772
@fabiopelosin fabiopelosin authored
Showing with 30 additions and 13 deletions.
  1. +1 −0  .gitignore
  2. +1 −1  .travis.yml
  3. +1 −1  Gemfile
  4. +27 −11 spec/spec_helper.rb
View
1  .gitignore
@@ -9,3 +9,4 @@ spec/fixtures/vcr
.yardoc
.rbx/
Gemfile.lock
+coverage/
View
2  .travis.yml
@@ -3,6 +3,6 @@ bundler_args: --without debugging documentation
rvm:
- 1.8.7
- 1.9.3
- # - rbx-18mode
+ - 2.0.0
- rbx-19mode
script: bundle exec rake spec
View
2  Gemfile
@@ -3,7 +3,7 @@ source "http://rubygems.org"
gemspec
group :development do
- gem 'coveralls', require: false
+ gem 'coveralls', :require => false
gem "mocha", "~> 0.11.4"
gem "bacon"
View
38 spec/spec_helper.rb
@@ -1,26 +1,44 @@
+
+# Set up coverage analysis
+#-----------------------------------------------------------------------------#
+
+require 'simplecov'
require 'coveralls'
-Coveralls.wear!
-require 'rubygems'
-require 'bundler/setup'
-require 'bacon'
-require 'mocha-on-bacon'
+if ENV['CI']
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
+else
+ SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
+end
+SimpleCov.start do
+ add_filter "/spec_helper/"
+ add_filter "vendor"
+end
-Bacon.summary_at_exit
+# Set up
+#-----------------------------------------------------------------------------#
require 'pathname'
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
-
$:.unshift((ROOT + 'lib').to_s)
+$:.unshift((ROOT + 'spec').to_s)
+
+require 'rubygems'
+require 'bundler/setup'
+require 'bacon'
+require 'mocha-on-bacon'
require 'cocoapods-core'
-$:.unshift((ROOT + 'spec').to_s)
+# Helpers
+#-----------------------------------------------------------------------------#
+
require 'spec_helper/bacon'
require 'spec_helper/fixture'
require 'spec_helper/temporary_directory'
-
require 'tmpdir'
+Bacon.summary_at_exit
+
module Bacon
class Context
include SpecHelper::Fixture
@@ -36,5 +54,3 @@ def copy_fixture_to_pod(name, pod)
path = SpecHelper::Fixture.fixture(name)
FileUtils.cp_r(path, pod.root)
end
-
-SpecHelper::Fixture.fixture('banana-lib') # ensure it exists
Please sign in to comment.
Something went wrong with that request. Please try again.