-
Notifications
You must be signed in to change notification settings - Fork 130
/
Rakefile
36 lines (26 loc) · 943 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'rubygems'
require 'rake'
require 'rspec/core'
require 'rspec/core/rake_task'
require 'bundler/gem_tasks'
desc "Run all specs in spec directory (excluding plugin specs)"
RSpec::Core::RakeTask.new(:spec)
INTEGRATION_LIBS = %w(will_paginate kaminari active_record active_model_serializers rspec)
namespace :spec do
namespace :integration do
INTEGRATION_LIBS.each do |lib|
desc "Run the #{lib} integrate specs"
RSpec::Core::RakeTask.new(lib.to_sym) do |t|
t.rspec_opts = "--tag integration"
t.pattern = "./spec/integration/#{lib}_spec.rb"
end
end
end
desc "Run all specs with rcov"
RSpec::Core::RakeTask.new(:rcov) do |t|
t.rcov = true
t.pattern = "./spec/**/*_spec.rb"
t.rcov_opts = '--exclude spec/,/gems/,/Library/,/usr/,lib/tasks,.bundle,config,/lib/rspec/,/lib/rspec-'
end
end
task :default => ([:spec] + INTEGRATION_LIBS.map { |l| "spec:integration:#{l}" })