forked from magicalpanda/MagicalRecord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
60 lines (44 loc) · 1023 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@ios_fixtures = "Unit Tests/Fixtures/iOS"
@target = ""
@project = ""
@fixtures = ""
namespace :setup do
task :ios do
end
task :osx do
@target = "Mac App Unit Tests"
@project = "Magical Record.xcodeproj"
@fixtures = "Unit Tests/Fixtures/Mac"
end
end
namespace :clean do
task :osx => ["setup:osx"] do
rm_rf "#{@fixtures}/TestEntities"
end
end
namespace :build do
task :run do
results = system("xcodebuild -project '#{@project}' -target '#{@target}'")
puts results
end
namespace :db do
task :create do
Dir.chdir(@fixtures) do
puts `/usr/local/bin/mogenerator -m TestModel.xcdatamodeld/TestModel.xcdatamodel -O TestEntities`
end
end
end
task :osx => ["setup:osx", "clean:osx", "build:db:create", "build:run"]
task :ios => [] do
end
end
namespace :test do
task :osx => ["build:osx"] do
puts "testing osx"
end
task :ios do
puts "testing ios"
end
end
task :test => ["test:osx", "test:ios"]
task :default => :test