forked from ontohub/ontohub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
31 lines (26 loc) · 1.28 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
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../lib/rake/task.rb', __FILE__)
require File.expand_path('../config/application', __FILE__)
Ontohub::Application.load_tasks
# Prevent Rspec to print file list unless enforced by the environment.
if defined?(RSpec) && ENV['SPEC_VERBOSE'] != 'true'
task(:spec).clear
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = false
end
end
# Remove load_schema/load_structure in tests, as db:migrate:clean
# will take care of everything.
Rake::Task['db:test:clone'].prerequisites.delete('db:test:load_schema')
Rake::Task['db:test:clone'].prerequisites << 'db:test:purge'
Rake::Task['db:test:clone_structure'].prerequisites.delete('db:test:load_structure')
Rake::Task['db:test:clone_structure'].prerequisites << 'db:test:purge'
# Run all test suites per default
Rake::Task['default'].prerequisites.delete('spec')
Rake::Task['default'].prerequisites.delete('cucumber')
Rake::Task['default'].enhance([:'test:abort_if_elasticsearch_is_not_running'])
Rake::Task['default'].enhance([:'test:enable_coverage'])
Rake::Task['default'].enhance([:'test:freshen_fixtures'])
task :default => [:spec, :cucumber]