forked from ClosureTree/closure_tree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
30 lines (24 loc) · 817 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
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
Bundler::GemHelper.install_tasks
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', 'README.md']
end
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
task :all_spec_flavors do
[["", ""], ["db_prefix_", ""], ["", "_db_suffix"], ["abc_", "_123"]].each do |prefix, suffix|
fail unless system("bundle exec rake spec DB_PREFIX=#{prefix} DB_SUFFIX=#{suffix}")
end
require 'active_record/version'
if ActiveRecord::VERSION::MAJOR == 3
fail unless system("rake spec ATTR_ACCESSIBLE=1")
end
end
# Run the specs using all the different database engines:
# for DB in sqlite3 mysql postgresql ; do rake ; done