Skip to content

Commit

Permalink
Correctly Loading Simplecov
Browse files Browse the repository at this point in the history
  • Loading branch information
plribeiro3000 committed Jul 23, 2014
1 parent 8940f81 commit bc07e27
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
17 changes: 16 additions & 1 deletion Rakefile
Expand Up @@ -7,5 +7,20 @@ Rake::TestTask.new do |t|
t.verbose = true
end

task :test_with_coverage do
if ENV['COVERAGE']
puts 'asd'
require 'coveralls'
require 'simplecov'

SimpleCov.start do
add_filter '/spec/'
end

Coveralls.wear!
end
Rake::Task['test'].execute
end

desc 'Default Task'
task :default => [ :test ]
task :default => [ :test_with_coverage ]
15 changes: 1 addition & 14 deletions spec/minitest_helper.rb
Expand Up @@ -17,17 +17,4 @@
c.natural = true
end

if ENV['COVERAGE']
require 'coveralls'
require 'simplecov'

SimpleCov.start do
add_filter '/spec/'
end
end

require File.join(File.dirname(__FILE__), '../lib/fog/xenserver.rb')

if ENV['COVERAGE']
Coveralls.wear!
end
require File.join(File.dirname(__FILE__), '../lib/fog/xenserver.rb')

0 comments on commit bc07e27

Please sign in to comment.