forked from garrettjacobson/spree_variant_options
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
58 lines (47 loc) · 1.24 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# # encoding: UTF-8
# require 'rubygems'
# begin
# require 'bundler/setup'
# rescue LoadError
# puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
# end
# #require 'rake'
# require 'rake/testtask'
# Bundler::GemHelper.install_tasks
# Rake::TestTask.new(:test) do |t|
# t.libs << 'lib'
# t.libs << 'test'
# t.pattern = 'test/**/*_test.rb'
# t.verbose = false
# end
# require 'cucumber/rake/task'
# Cucumber::Rake::Task.new do |t|
# t.cucumber_opts = %w{--format pretty}
# end
# task :default => [ :test, :cucumber ]
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
require 'spree/testing_support/extension_rake'
desc 'Generates a dummy app for testing'
task :test_app do
ENV['LIB_NAME'] = 'spree_variant_options'
Rake::Task['extension:test_app'].invoke
end
require 'rspec/core'
require 'rspec/core/rake_task'
Rake::Task["spec"].clear
RSpec::Core::RakeTask.new(:spec) do |t|
t.fail_on_error = false
t.rspec_opts = %w[-f JUnit -o results.xml]
end
desc "Run RSpec with code coverage"
task :coverage do
ENV['COVERAGE'] = 'true'
Rake::Task["spec"].execute
end
task :default => :spec
Bundler::GemHelper.install_tasks