forked from activerecord-hackery/squeel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
31 lines (24 loc) · 701 Bytes
/
Rakefile
File metadata and controls
31 lines (24 loc) · 701 Bytes
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
require 'bundler/setup'
require 'rspec/core/rake_task'
Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new(:spec) do |rspec|
rspec.rspec_opts = ['--backtrace', '--color', '--format documentation']
end
task :default => 'test_sqlite3'
%w(sqlite3 mysql mysql2 postgresql).each do |adapter|
namespace :test do
task(adapter => ["#{adapter}:env", "spec"])
end
namespace adapter do
task(:env) { ENV['SQ_DB'] = adapter }
end
task "test_#{adapter}" => ["#{adapter}:env", "test:#{adapter}"]
end
desc "Open an irb session with Squeel and the sample data used in specs"
task :console do
require 'irb'
require 'irb/completion'
require 'console'
ARGV.clear
IRB.start
end