-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
40 lines (30 loc) · 923 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
38
require 'rake'
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
desc "Run unit specs"
RSpec::Core::RakeTask.new(:unit) do |t|
t.rspec_opts = %w(-fd -c)
t.pattern = "./spec/unit/**/*_spec.rb"
end
desc "Run integration specs that are very high level"
RSpec::Core::RakeTask.new(:integration) do |t|
t.rspec_opts = %w(-fd -c)
t.pattern = "./spec/integration/**/*_spec.rb"
end
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w(-fd -c)
end
# this is for running tests that you've marked current... eg: it 'should work', :current => true do
RSpec::Core::RakeTask.new(:current) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = ['--tag current']
end
# alias for current
RSpec::Core::RakeTask.new(:c) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rspec_opts = ['--tag current']
end
task :default => :spec
task :test => :spec