mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-22 11:46:10 +08:00
fix the test for nil block
This commit is contained in:
@@ -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
|
||||
|
||||
2
test/test/vendor/code/code.m
vendored
2
test/test/vendor/code/code.m
vendored
@@ -61,7 +61,7 @@
|
||||
if (block != nil) {
|
||||
return block();
|
||||
}
|
||||
return nil;
|
||||
return [NSNumber numberWithInt:42];
|
||||
}
|
||||
|
||||
+ (BOOL)testValueForKey:(id)obj expected:(id)expected
|
||||
|
||||
Reference in New Issue
Block a user