Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove '__' macro; more koans for nil and nsarray

  • Loading branch information...
commit 5d1ceea19b202ca7894e4804499aedd15fd7d512 1 parent 21d2eb2
Joe Cannatti authored
14 AboutNSArray.m
View
@@ -0,0 +1,14 @@
+//
+// AboutNSArray.m
+// ObjectiveCKoans
+//
+// Created by Joe Cannatti on 12/30/10.
+// Copyright 2010 Puppy Sound Software. All rights reserved.
+//
+
+#import "AboutNSArray.h"
+
+
+@implementation AboutNSArray
+
+@end
10 AboutNil.m
View
@@ -7,7 +7,6 @@
//
#import "Kiwi.h"
-#import "KoansIncludes.h"
SPEC_BEGIN(AboutNil)
@@ -15,12 +14,19 @@
it(@"evaluates to false in conditionals", ^{
[[NSObject shouldNot] receive:@selector(description)];
- NSObject *panda = __;
+ id panda = [NSObject new];
if(panda){
[NSObject description];
}
});
+ it(@"should not raise an exception if sent a message", ^{
+ [[theBlock(^{
+ id panda = nil;
+ [panda description];
+ }) should] raise];
+ });
+
});
SPEC_END
9 AboutValueAssertions.m
View
@@ -7,7 +7,6 @@
//
#import "Kiwi.h"
-#import "KoansIncludes.h"
SPEC_BEGIN(AboutValueAssertions)
@@ -40,10 +39,6 @@
});
- it(@"sometimes will ask you to fill in a value", ^{
- [[theValue(2) should] equal:__];
- });
-
it(@"can assert that a variable contains nil", ^{
NSObject *object = [NSObject new];
[object shouldBeNil];
@@ -68,7 +63,7 @@
});
it(@"can assert that a value is within a range", ^{
- [[theValue(4) should] beWithin:theValue(4) of:theValue(77)];
+ [[theValue(4) should] beWithin:theValue(4) of:theValue(9)];
});
it(@"can assert that a value is less than another value", ^{
@@ -88,7 +83,7 @@
});
it(@"can assert that a value is between to values", ^{
- [[theValue(4) should] beBetween:theValue(5) and:theValue(7)];
+ [[theValue(4) should] beBetween:theValue(5) and:theValue(6)];
});
it(@"can assert two variable contain the same pointer", ^{
10 KoansIncludes.h
View
@@ -1,10 +0,0 @@
-/*
- * KoansIncludes.h
- * ObjectiveCKoans
- *
- * Created by Joe Cannatti on 12/23/10.
- * Copyright 2010 Puppy Sound Software. All rights reserved.
- *
- */
-
-#define __ theValue(@"87E2EB44-FC38-4C5E-8D1C-4A4A64103DFF")
6 ObjectiveCKoans.xcodeproj/project.pbxproj
View
@@ -66,6 +66,7 @@
D15C53D212C3F9A100929E2A /* NSValue+KiwiAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = D15C539912C3F9A000929E2A /* NSValue+KiwiAdditions.m */; };
D15C53E812C3FB6300929E2A /* AboutValueAssertions.m in Sources */ = {isa = PBXBuildFile; fileRef = D15C53E712C3FB6300929E2A /* AboutValueAssertions.m */; };
D174002512C43FE500775C72 /* AboutNil.m in Sources */ = {isa = PBXBuildFile; fileRef = D174002412C43FE500775C72 /* AboutNil.m */; };
+ D17C5AEB12CD6C8300E961B8 /* AboutNSArray.m in Sources */ = {isa = PBXBuildFile; fileRef = D17C5AEA12CD6C8300E961B8 /* AboutNSArray.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -200,8 +201,8 @@
D15C539812C3F9A000929E2A /* NSValue+KiwiAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+KiwiAdditions.h"; sourceTree = "<group>"; };
D15C539912C3F9A000929E2A /* NSValue+KiwiAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSValue+KiwiAdditions.m"; sourceTree = "<group>"; };
D15C53E712C3FB6300929E2A /* AboutValueAssertions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutValueAssertions.m; sourceTree = "<group>"; };
- D15C542912C4018400929E2A /* KoansIncludes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KoansIncludes.h; sourceTree = "<group>"; };
D174002412C43FE500775C72 /* AboutNil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutNil.m; sourceTree = "<group>"; };
+ D17C5AEA12CD6C8300E961B8 /* AboutNSArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutNSArray.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -247,10 +248,10 @@
D15C531112C3F8C700929E2A /* Tests */ = {
isa = PBXGroup;
children = (
- D15C542912C4018400929E2A /* KoansIncludes.h */,
D15C531C12C3F9A000929E2A /* Kiwi */,
D15C53E712C3FB6300929E2A /* AboutValueAssertions.m */,
D174002412C43FE500775C72 /* AboutNil.m */,
+ D17C5AEA12CD6C8300E961B8 /* AboutNSArray.m */,
);
name = Tests;
sourceTree = "<group>";
@@ -523,6 +524,7 @@
D15C53D212C3F9A100929E2A /* NSValue+KiwiAdditions.m in Sources */,
D15C53E812C3FB6300929E2A /* AboutValueAssertions.m in Sources */,
D174002512C43FE500775C72 /* AboutNil.m in Sources */,
+ D17C5AEB12CD6C8300E961B8 /* AboutNSArray.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Please sign in to comment.
Something went wrong with that request. Please try again.