-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
47 lines (33 loc) · 960 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
namespace :xcode do
namespace :build do
desc %{Builds the Release configuration}
task :release do
sh "xcodebuild -configuration Release"
end
desc %{Builds the Debug configuration}
task :debug do
sh "xcodebuild -configuration Debug"
end
task :default => :release
end
end
namespace :spec do
task :init => "xcode:build:debug"
desc %{Runs a single spec, passed as an argument}
task :file => :init do
sh "macruby /usr/bin/bacon #{ARGV[1]}"
end
desc %{Runs all specs in the spec folder}
task :all => :init do
sh "macruby /usr/bin/bacon spec/*_spec.rb"
end
desc %{Runs the spec for the provided ObjC file}
task :for => :init do
basename = File.basename(ARGV[1], ".*")
spec_file = "spec/#{basename}_spec.rb"
sh "macruby /usr/bin/bacon #{spec_file}"
end
end
desc %{Runs the entire spec suite}
task :spec => 'spec:all'
task :default => 'spec'