File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : objective-c
22before_install :
33 - gem install cocoapods --no-rdoc --no-ri --no-document --quiet
4+ - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
45 - brew update
5- - brew uninstall xctool && brew install xctool --HEAD
66 - cd Tests && pod install && cd $TRAVIS_BUILD_DIR
77script : rake test:ios
Original file line number Diff line number Diff line change 11namespace :test do
2+ def run_tests ( scheme , sdk )
3+ system ( "xcodebuild -workspace AFNetworking.xcworkspace -scheme '#{ scheme } ' -sdk '#{ sdk } ' -configuration Release test | xcpretty -c ; exit ${PIPESTATUS[0]}" )
4+ end
5+
26 task :prepare do
37 system ( %Q{mkdir -p "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes" && cp Tests/Schemes/*.xcscheme "Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/"} )
48 end
59
610 desc "Run the AFNetworking Tests for iOS"
711 task :ios => :prepare do
8- $ios_success = system ( "xctool -workspace AFNetworking.xcworkspace -scheme 'iOS Tests' -sdk iphonesimulator -configuration Release test -test-sdk iphonesimulator" )
12+ $ios_success = run_tests ( 'iOS Tests' , ' iphonesimulator' )
913 end
1014
1115 desc "Run the AFNetworking Tests for Mac OS X"
1216 task :osx => :prepare do
13- $osx_success = system ( "xctool -workspace AFNetworking.xcworkspace -scheme 'OS X Tests' -sdk macosx -configuration Release test -test-sdk macosx" )
17+ $osx_success = run_tests ( 'OS X Tests' , ' macosx' )
1418 end
1519end
1620
You can’t perform that action at this time.
0 commit comments