Permalink
Browse files

change way coverage is reported to coveralls

  • Loading branch information...
1 parent 7c1f8b3 commit 203eca116006ad639f1660738cc06f853f9aa157 @Arie committed Apr 12, 2013
Showing with 6 additions and 22 deletions.
  1. +4 −0 Rakefile
  2. +0 −4 features/support/env.rb
  3. +2 −14 script/ci
  4. +0 −4 spec/spec_helper.rb
View
@@ -5,3 +5,7 @@
require File.expand_path('../config/application', __FILE__)
Serveme::Application.load_tasks
+
+require 'coveralls/rake/task'
+Coveralls::RakeTask.new
+task :test_with_coveralls => [:spec, :cucumber, 'coveralls:push']
@@ -1,10 +1,6 @@
require 'simplecov'
require 'coveralls'
-SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
- SimpleCov::Formatter::HTMLFormatter,
- Coveralls::SimpleCov::Formatter
-]
SimpleCov.start 'rails'
require 'cucumber/rails'
View
@@ -19,17 +19,5 @@ if [[ -d coverage ]]; then
rm -r coverage
fi
-echo "--- Running RSpec"
-
-run rspec --color spec --format progress --format html --out rspec.html
-rspec=$?
-
-echo "--- Running Cucumber"
-
-run cucumber features --profile ci --format html --out cucumber.html
-cucumber=$?
-
-if [[ $rspec -ne 0 || $cucumber -ne 0 ]]; then
- echo "--- Some tests have failed."
- exit 1
-fi
+echo "--- Running RSpec and Cucumber ---"
+run rake test_with_coveralls
View
@@ -1,10 +1,6 @@
require 'simplecov'
require 'coveralls'
-SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
- SimpleCov::Formatter::HTMLFormatter,
- Coveralls::SimpleCov::Formatter
-]
SimpleCov.start 'rails'
# This file is copied to spec/ when you run 'rails generate rspec:install'

0 comments on commit 203eca1

Please sign in to comment.