forked from rcarver/mysql-inspector
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (26 loc) · 712 Bytes
/
Rakefile
File metadata and controls
36 lines (26 loc) · 712 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
32
33
34
35
36
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rake/testtask'
task :test => [:test_default, :test_ar]
Rake::TestTask.new(:test_default) do |t|
t.libs.push "lib", "test"
t.pattern = 'test/mysql_inspector/**/*_test.rb'
end
Rake::TestTask.new(:test_ar) do |t|
t.libs.push "lib", "test"
t.pattern = 'test/mysql_inspector_ar/**/*_test.rb'
end
def load_schema(name)
$LOAD_PATH.unshift "test"
require 'helpers/mysql_schemas'
require 'helpers/mysql_utils'
schemas = Object.new
schemas.extend MysqlSchemas
MysqlUtils.create_mysql_database("mysql_inspector_development", schemas.send(name))
end
task :db1 do
load_schema(:schema_a)
end
task :db2 do
load_schema(:schema_b)
end