Created
July 23, 2009 22:06
-
-
Save Shadowfiend/153673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation MyClass : CPObject | |
{ | |
} | |
- (CPNumber)reverse | |
{ | |
return 5; | |
} | |
@end | |
[Test for: MyClass | |
beforeEach: function() { | |
this.instance = [[MyClass alloc] init] | |
} | |
checking: function() { | |
[MyClass should: "return 5 for reversing" | |
by: function() { | |
[[this.instance reverse] shouldEqual: 5]; | |
}]; | |
[MyClass should: "return 4 for reversing" | |
by: function() { | |
[[this.instance reverse] shouldEqual: 4] | |
}]; | |
[MyClass should: "fail with an exception baby" | |
by: function() { | |
[[this.instance reverse] shouldNotEqual: "nothing"] | |
}]; | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment