我最近开始学习 Objective-C 并使用与 Xcode 捆绑在一起的 OCUnit 编写我的测试。
我是一名 Ruby 程序员,我已经习惯了 RSpec 和 Cucumber - 不错的 BDD 框架。
在 Objective-C 中是否有合适的 BDD 框架?我想念我的“应该”:)
最佳答案
我正在使用 Kiwi Library集成速度快,效果很好。
来自 their github :
describe(@"Team", ^{
context(@"when newly created", ^{
it(@"should have a name", ^{
id team = [Team team];
[[team.name should] equal:@"Black Hawks"];
});
it(@"should have 11 players", ^{
id team = [Team team];
[[[team should] have:11] players];
});
});
});
关于objective-c - Objective-C 中的 BDD,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1318509/