Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v2.1.0
Fetching contributors…

Cannot retrieve contributors at this time

45 lines (34 sloc) 1.121 kb
require "bundler/gem_helper"
require "rspec/core/rake_task"
Bundler::GemHelper.install_tasks(name: "periscope")
Bundler::GemHelper.install_tasks(name: "periscope-activerecord")
Bundler::GemHelper.install_tasks(name: "periscope-mongo_mapper")
Bundler::GemHelper.install_tasks(name: "periscope-mongoid")
Bundler::GemHelper.install_tasks(name: "periscope-data_mapper")
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}:adapter") do |t|
t.pattern = "spec/periscope/adapters/#{adapter}_spec.rb"
end
namespace adapter do
task :adapter do
ENV["ADAPTER"] = adapter
end
end
end
RSpec::Core::RakeTask.new(spec: [:coverage] + ADAPTERS + [:adapter]) do |t|
t.pattern = "spec/periscope_spec.rb"
end
task :coverage do
ENV["COVERAGE"] = "true"
end
task :adapter do
ENV["ADAPTER"] = nil
end
Rake::Task[:spec].enhance do
require "simplecov"
require "coveralls"
Coveralls::SimpleCov::Formatter.new.format(SimpleCov.result)
end
task default: :spec
Jump to Line
Something went wrong with that request. Please try again.