-
Notifications
You must be signed in to change notification settings - Fork 52
/
Rakefile
35 lines (29 loc) · 953 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
require 'bundler'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
# Put spec opts in a file named .rspec in root
end
desc "Run features"
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format progress"
end
Bundler::GemHelper.install_tasks
task :default => [:spec, :features]
desc "Run with code coverage"
task :coverage do
ENV['COVERAGE'] = 'true' if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9')
Rake::Task["spec"].execute
Rake::Task["features"].execute
end
desc "Run test with coveralls"
task :test_with_coveralls => [:coverage, 'coveralls_push_workaround']
task :coveralls_push_workaround do
if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('1.9')
require 'coveralls/rake/task'
Coveralls::RakeTask.new
Rake::Task["coveralls:push"].invoke
end
end