Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (25 sloc) 1.129 kb
a4e8f97d »
2010-07-14 A simple README
1 See http://github.com/alloy/UISpec/blob/master/installation.txt for the UISpec install file.
2
3
4 An example of a Kicker (http://github.com/alloy/kicker) script to build and run specs continuously:
5
6 require 'tmpdir'
7
8 SDK_DIR = "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk"
9 TMP_USER_HOME = Dir.tmpdir
10
11 def with_env(env)
12 before = env.inject({}) { |h, (k, _)| h[k] = ENV[k]; h }
13 env.each { |k, v| ENV[k] = v }
14 yield
15 ensure
16 before.each { |k, v| ENV[k] = v }
17 end
18
19 def run_specs
20 if system("xcodebuild -project Project.xcodeproj -target UISpecs -configuration Debug -sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk > /dev/null")
21 with_env('DYLD_ROOT_PATH' => SDK_DIR, 'IPHONE_SIMULATOR_ROOT' => SDK_DIR, 'CFFIXED_USER_HOME' => TMP_USER_HOME) do
22 system "./build/Debug-iphonesimulator/UISpecs.app/UISpecs -RegisterForSystemEvents"
23 end
24 else
25 puts "[!] Failed to build UISpecs.app"
26 end
27 end
28
29 process do |files|
30 run_specs if files.any? { |file| file =~ /Classes|Spec/ }
31 files.clear
32 end
Something went wrong with that request. Please try again.