forked from neo4jrb/devise-activegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
28 lines (25 loc) · 790 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
require "rake/testtask"
require "bundler/gem_tasks"
desc 'Run tests for devise-neo4j.'
Rake::TestTask.new(:test) do |test|
ENV['DEVISE_ORM'] = 'neo4j'
ENV['DEVISE_PATH'] = `bundle show devise`.chomp
unless File.exist?(ENV['DEVISE_PATH'])
puts "Devise not found in gem bundle"
exit
end
test.libs << ENV['GEM_HOME'] << "test"
test.libs << "#{ENV['DEVISE_PATH']}/lib"
test.libs << "#{ENV['DEVISE_PATH']}/test"
test.test_files = FileList["#{ENV['DEVISE_PATH']}/test/**/*_test.rb"] + FileList['test/**/*_test.rb']
test.verbose = true
end
task :default => [:test, :"neo4j:db:remove"]
namespace :neo4j do
namespace :db do
desc 'Remove the neo4j db files'
task :remove do
system "rm -fr #{File.join(File.dirname(__FILE__), "db", "*")}"
end
end
end