Commit 91b23f8

mo khan <mo@mokhan.ca>
2013-05-16 03:38:21
FINALLY... i got the unit tests to run
1 parent ae659e9
MovieLibrary.xcodeproj/project.pbxproj
@@ -21,7 +21,6 @@
 		CD7ADE68174315F400B5B281 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD7ADE48174315F400B5B281 /* UIKit.framework */; };
 		CD7ADE69174315F400B5B281 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD7ADE4A174315F400B5B281 /* Foundation.framework */; };
 		CD7ADE71174315F400B5B281 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CD7ADE6F174315F400B5B281 /* InfoPlist.strings */; };
-		CD7ADE74174315F400B5B281 /* MovieLibraryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD7ADE73174315F400B5B281 /* MovieLibraryTests.m */; };
 		CDD4CA5D17431B260096B316 /* SampleSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = CDD4CA5C17431B260096B316 /* SampleSpec.m */; };
 /* End PBXBuildFile section */
 
@@ -54,8 +53,6 @@
 		CD7ADE66174315F400B5B281 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
 		CD7ADE6E174315F400B5B281 /* MovieLibraryTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "MovieLibraryTests-Info.plist"; sourceTree = "<group>"; };
 		CD7ADE70174315F400B5B281 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		CD7ADE72174315F400B5B281 /* MovieLibraryTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MovieLibraryTests.h; sourceTree = "<group>"; };
-		CD7ADE73174315F400B5B281 /* MovieLibraryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MovieLibraryTests.m; sourceTree = "<group>"; };
 		CDD4CA5C17431B260096B316 /* SampleSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SampleSpec.m; sourceTree = "<group>"; };
 		D91DCCBA6E0B41B789B58675 /* Pods-MovieLibraryTests.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MovieLibraryTests.xcconfig"; path = "Pods/Pods-MovieLibraryTests.xcconfig"; sourceTree = SOURCE_ROOT; };
 /* End PBXFileReference section */
@@ -144,8 +141,6 @@
 		CD7ADE6C174315F400B5B281 /* MovieLibraryTests */ = {
 			isa = PBXGroup;
 			children = (
-				CD7ADE72174315F400B5B281 /* MovieLibraryTests.h */,
-				CD7ADE73174315F400B5B281 /* MovieLibraryTests.m */,
 				CD7ADE6D174315F400B5B281 /* Supporting Files */,
 				CDD4CA5C17431B260096B316 /* SampleSpec.m */,
 			);
@@ -309,7 +304,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD7ADE74174315F400B5B281 /* MovieLibraryTests.m in Sources */,
 				CDD4CA5D17431B260096B316 /* SampleSpec.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
MovieLibraryTests/MovieLibraryTests.h
@@ -1,13 +0,0 @@
-//
-//  MovieLibraryTests.h
-//  MovieLibraryTests
-//
-//  Created by mo khan on 2013-05-14.
-//  Copyright (c) 2013 mo khan. All rights reserved.
-//
-
-#import <SenTestingKit/SenTestingKit.h>
-
-@interface MovieLibraryTests : SenTestCase
-
-@end
MovieLibraryTests/MovieLibraryTests.m
@@ -1,32 +0,0 @@
-//
-//  MovieLibraryTests.m
-//  MovieLibraryTests
-//
-//  Created by mo khan on 2013-05-14.
-//  Copyright (c) 2013 mo khan. All rights reserved.
-//
-
-#import "MovieLibraryTests.h"
-
-@implementation MovieLibraryTests
-
-- (void)setUp
-{
-    [super setUp];
-    
-    // Set-up code here.
-}
-
-- (void)tearDown
-{
-    // Tear-down code here.
-    
-    [super tearDown];
-}
-
-- (void)testExample
-{
-    STFail(@"Unit tests are not implemented yet in MovieLibraryTests");
-}
-
-@end
MovieLibraryTests/SampleSpec.m
@@ -13,7 +13,7 @@ describe(@"Math", ^{
     it(@"is pretty cool", ^{
       NSUInteger a = 16;
       NSUInteger b = 26;
-      [[theValue(a+b) should] equal:theValue(43)];
+      [[theValue(a+b) should] equal:theValue(42)];
     });
 });
 
Rakefile
@@ -11,7 +11,5 @@ task :build => :clean do
 end
 
 task :test => :build do
-  #system "xcodebuild -workspace MovieLibrary.xcworkspace/ -sdk iphonesimulator -configuration Debug -scheme Pods-MovieLibraryTests RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES clean build"
-  #system "xcodebuild -sdk iphonesimulator -workspace MovieLibrary.xcworkspace -scheme Pods-MovieLibraryTests -configuration Release RUN_APPLICATION_TESTS_WITH_IOS_SIM=YES ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES TEST_HOST='' clean build 2>&1"
-  system "xctool -workspace MovieLibrary.xcworkspace -scheme MovieLibrary test -only MovieLibraryTests"
+  system "xctool -workspace MovieLibrary.xcworkspace -scheme MovieLibrary test TEST_AFTER_BUILD=YES TEST_HOST=''"
 end