Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug where coverage was not being merged in the default Rake task

  • Loading branch information...
commit 8114a031d8c37900fd0ebbed5a6f03788a43793f 1 parent 58004a0
@laserlemon authored
Showing with 9 additions and 10 deletions.
  1. +9 −10 Rakefile
View
19 Rakefile
@@ -11,35 +11,34 @@ ADAPTERS = %w(active_record data_mapper mongo_mapper mongoid)
ADAPTERS.each do |adapter|
desc "Run RSpec code examples for #{adapter} adapter"
- RSpec::Core::RakeTask.new(adapter => "#{adapter}:env") do |t|
+ RSpec::Core::RakeTask.new(adapter => "#{adapter}:adapter") do |t|
t.pattern = "spec/periscope/adapters/#{adapter}_spec.rb"
end
namespace adapter do
- task :env do
+ task :adapter do
ENV["ADAPTER"] = adapter
end
end
end
-RSpec::Core::RakeTask.new(spec: (ADAPTERS + [:env])) do |t|
+RSpec::Core::RakeTask.new(spec: [:coverage] + ADAPTERS + [:adapter]) do |t|
t.pattern = "spec/periscope_spec.rb"
end
-task :env do
- ENV["ADAPTER"] = nil
+task :coverage do
ENV["COVERAGE"] = "true"
end
-task :coveralls do
+task :adapter do
+ ENV["ADAPTER"] = nil
+end
+
+Rake::Task[:spec].enhance do
require "simplecov"
require "coveralls"
Coveralls::SimpleCov::Formatter.new.format(SimpleCov.result)
end
-Rake::Task[:spec].enhance do
- Rake::Task[:coveralls].invoke
-end
-
task default: :spec
Please sign in to comment.
Something went wrong with that request. Please try again.