-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
37 lines (29 loc) · 895 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
37
require 'rake'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'coveralls/rake/task'
Coveralls::RakeTask.new
task "default" => [:ci, 'coveralls:push']
desc "Run all tests for CI"
task "ci" => "spec"
desc "Run all specs"
task "spec" => "spec:all"
namespace "spec" do
task "all" => ["gaq", "static", "dynamic"]
desc "Run gaq specs"
RSpec::Core::RakeTask.new("gaq") do |t|
t.rspec_opts = "-r ./spec/coveralls_helper"
end
desc "Run static specs"
RSpec::Core::RakeTask.new("static") do |t|
ENV['RAILS_ENV'] = 'test_static'
t.pattern = "spec-dummy/spec/**/*_spec.rb"
t.rspec_opts = "-I spec-dummy/spec --tag ~dynamic"
end
desc "Run dynamic specs"
RSpec::Core::RakeTask.new("dynamic") do |t|
ENV['RAILS_ENV'] = 'test_dynamic'
t.pattern = "spec-dummy/spec/**/*_spec.rb"
t.rspec_opts = "-I spec-dummy/spec --tag ~static"
end
end