fix the test for nil block

This commit is contained in:
Laurent Sansonetti
2013-10-14 16:13:18 +02:00
parent 8d4079358b
commit 6026906b61
2 changed files with 2 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ end
describe 'A method accepting a block' do
it "can be called (1)" do
TestMethod.testMethodCallingBlock(lambda { 42 }).should == 42
TestMethod.testMethodCallingBlock(nil).should == nil
TestMethod.testMethodCallingBlock(nil).should == 42
end
it "can be called (2)" do

View File

@@ -61,7 +61,7 @@
if (block != nil) {
return block();
}
return nil;
return [NSNumber numberWithInt:42];
}
+ (BOOL)testValueForKey:(id)obj expected:(id)expected