-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Rakefile
42 lines (35 loc) · 915 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
39
40
41
42
# frozen_string_literal: true
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rspec/core/rake_task'
require 'spree/testing_support/dummy_app/rake_tasks'
require 'bundler/gem_tasks'
RSpec::Core::RakeTask.new
task default: :spec
DummyApp::RakeTasks.new(
gem_root: File.dirname(__FILE__),
lib_name: 'solidus_core'
)
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new(:yard)
# The following workaround can be removed
# once https://github.com/lsegal/yard/pull/1457 is merged.
task('yard:require') { require 'yard' }
task yard: 'yard:require'
namespace :spec do
task :isolated do
spec_files = Dir['spec/**/*_spec.rb']
failed_specs =
spec_files.reject do |file|
puts "rspec #{file}"
system('rspec', file)
end
if !failed_specs.empty?
puts "Failed specs:"
puts failed_specs
exit 1
end
end
end
task test_app: 'db:reset'