Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v1.0.0
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (26 sloc) 0.922 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 mongo_mapper mongoid data_mapper)
ADAPTERS.each do |adapter|
desc "Run RSpec code examples for #{adapter} adapter"
RSpec::Core::RakeTask.new(adapter => "#{adapter}:env") do |t|
t.pattern = "spec/periscope/adapters/#{adapter}_spec.rb"
end
namespace adapter do
task :env do
ENV['ADAPTER'] = adapter
end
end
end
RSpec::Core::RakeTask.new(:spec => (ADAPTERS + [:env])) do |t|
t.pattern = 'spec/periscope_spec.rb'
end
task :env do
ENV['ADAPTER'] = nil
end
task :default => :spec
Jump to Line
Something went wrong with that request. Please try again.