Permalink
Browse files

ignored simplecov when running coveralls

  • Loading branch information...
1 parent a4fea4c commit 2fcd262c333fd5a19d8f1a475d569f81f37a65d7 @hsbt hsbt committed Mar 19, 2013
Showing with 32 additions and 23 deletions.
  1. +1 −3 Gemfile
  2. +3 −5 Gemfile.lock
  3. +16 −14 spec/spec_helper.rb
  4. +12 −1 test/test_helper.rb
View
@@ -52,6 +52,7 @@ group :development do
gem 'launchy'
gem 'sequel'
gem 'sqlite3'
+ gem 'jasmine'
gem 'rcov', :platforms => :mri_18
if RUBY_VERSION > '1.9' # bundler did't provide :mri_20 platform
@@ -60,8 +61,5 @@ group :development do
end
gem 'ci_reporter'
gem 'coveralls', :require => false
-
- gem 'json' # broken jasmine-1.3.0 dependency
- gem 'jasmine', '1.3.0'
end
end
View
@@ -45,13 +45,12 @@ GEM
highline (1.6.16)
hike (1.2.1)
httpauth (0.2.0)
- jasmine (1.3.0)
- jasmine-core (>= 1.3.0)
+ jasmine (1.3.2)
+ jasmine-core (~> 1.3.1)
rack (~> 1.0)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
jasmine-core (1.3.1)
- json (1.7.7)
jwt (0.1.8)
multi_json (>= 1.5)
launchy (2.2.0)
@@ -169,8 +168,7 @@ DEPENDENCIES
ci_reporter
coffee-script
coveralls
- jasmine (= 1.3.0)
- json
+ jasmine
launchy
omniauth
omniauth-github
View
@@ -5,22 +5,24 @@
require 'tdiary/environment'
-require 'simplecov'
-require 'simplecov-rcov'
-class SimpleCov::Formatter::MergedFormatter
- def format(result)
- SimpleCov::Formatter::HTMLFormatter.new.format(result)
- SimpleCov::Formatter::RcovFormatter.new.format(result)
+if ENV['COVERAGE'] = 'simplecov'
+ require 'simplecov'
+ require 'simplecov-rcov'
+ class SimpleCov::Formatter::MergedFormatter
+ def format(result)
+ SimpleCov::Formatter::HTMLFormatter.new.format(result)
+ SimpleCov::Formatter::RcovFormatter.new.format(result)
+ end
end
+ SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
+ SimpleCov.start do
+ add_filter '/spec/'
+ add_filter '/vendor/'
+ end
+else
+ require 'coveralls'
+ Coveralls.wear!
end
-SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
-SimpleCov.start do
- add_filter '/spec/'
- add_filter '/vendor/'
-end
-
-require 'coveralls'
-Coveralls.wear!
require 'tdiary'
View
@@ -1,2 +1,13 @@
-$:.unshift File.expand_path(File.join(File.dirname(__FILE__), '../misc/plugin')).untaint
+# -*- coding: utf-8 -*-
+['..', '../misc/plugin'].each do |path|
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), path)).untaint
+end
+
+require 'tdiary/environment'
+
require 'test/unit'
+
+unless defined?(RCov)
+ require 'coveralls'
+ Coveralls.wear!
+end

0 comments on commit 2fcd262

Please sign in to comment.