-
Notifications
You must be signed in to change notification settings - Fork 10
/
Rakefile
34 lines (27 loc) · 950 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
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'active_record'
require_relative 'spec/support/config'
require_relative 'spec/support/connection'
RSpec::Core::RakeTask.new(:spec)
task default: :spec
namespace :spec do
include ActiveRecord::Tasks
desc 'Run isolated non-Redshift reliant code examples'
RSpec::Core::RakeTask.new(:isolated) do |t|
t.pattern = 'spec/lib/**/*_spec.rb'
end
desc 'Run Redshift reliant code examples'
RSpec::Core::RakeTask.new(:redshift) do |t|
t.pattern = 'spec/redshift/**/*_spec.rb'
end
task :environment do
ARTest.connect
# DatabaseTasks.current_config = ARTest.config
DatabaseTasks.database_configuration = ARTest.config
DatabaseTasks.db_dir = File.expand_path('../spec/db', __FILE__)
DatabaseTasks.env = 'test'
DatabaseTasks.migrations_paths = File.join(DatabaseTasks.db_dir, 'migrate')
end
load 'active_record/railties/databases.rake'
end