1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #1916 from maxlinc/code_coverage

Code coverage (cleanup based on PR comments)
This commit is contained in:
Wesley Beary 2013-06-25 09:38:23 -07:00
commit e93a632167
2 changed files with 12 additions and 14 deletions

View file

@ -53,20 +53,15 @@ require "tasks/test_task"
Fog::Rake::TestTask.new
namespace :test do
mock = 'true' || ENV['FOG_MOCK']
task :travis do
[true].each do |mock|
sh("export FOG_MOCK=#{mock} && bundle exec shindont")
end
end
task :vsphere do
[true].each do |mock|
sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/vsphere")
end
end
task :openvz do
[true].each do |mock|
sh("export FOG_MOCK=#{mock} && bundle exec shindont tests/openvz")
end
end
end
@ -194,7 +189,8 @@ require "tasks/changelog_task"
Fog::Rake::ChangelogTask.new
task :coveralls_push_workaround do
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9')
ENV['COVERAGE'] = 'false' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9')
unless ENV['COVERAGE'] == 'false'
require 'coveralls/rake/task'
Coveralls::RakeTask.new
Rake::Task["coveralls:push"].invoke

View file

@ -1,13 +1,15 @@
require 'simplecov'
require 'coveralls'
SimpleCov.command_name "shindo:#{Process.pid.to_s}"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.merge_timeout 3600
SimpleCov.start if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9')
unless ENV['COVERAGE'] == 'false'
SimpleCov.command_name "shindo:#{Process.pid.to_s}"
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.merge_timeout 3600
SimpleCov.start
end
ENV['FOG_RC'] = ENV['FOG_RC'] || File.expand_path('../.fog', __FILE__)
ENV['FOG_CREDENTIAL'] = ENV['FOG_CREDENTIAL'] || 'default'