-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRakefile
More file actions
29 lines (22 loc) · 843 Bytes
/
Rakefile
File metadata and controls
29 lines (22 loc) · 843 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
WORKSPACE = 'VENCore.xcworkspace'
SCHEME = 'VENCore'
desc 'Run the tests'
task :test do
require_binary 'bundle', 'gem install bundler'
sh 'bundle exec pod install'
require_binary 'xcodebuild', 'brew install xcodebuild'
require_binary 'xcpretty', 'bundle install'
sh "xcodebuild test -workspace #{WORKSPACE} -scheme #{SCHEME} -destination 'platform=iOS Simulator,name=iPhone 4s,OS=latest' | bundle exec xcpretty --color; exit ${PIPESTATUS[0]}"
end
task :default => :test
desc 'Print test coverage of the last test run.'
task :coverage do
require_binary 'slather', 'bundle install'
sh 'slather coverage -s'
end
private
def require_binary(binary, install)
if `which #{binary}`.length == 0
fail "\nERROR: #{binary} isn't installed. Please install #{binary} with the following command:\n\n $ #{install}\n\n"
end
end