【问题标题】:ios TDD with Kiwi, OCHamcrest and OCMockiti, can they be mixed?ios TDD 与 Kiwi、OCHamcrest 和 OCMockiti,它们可以混合使用吗?
【发布时间】:2012-06-12 22:22:45
【问题描述】:

有没有人成功让 OCHamcrest 与 Kiwi 合作?我已经启动了一个 Kiwi 项目,然后我添加了 OCHamcrest 框架并成功构建。

但是,当我尝试使用 hamcrest 在我的 Kiwi 测试文件中断言条件时:

    it(@"has 3 elements.", ^{
         assertThat(stack, hasCountOf(3));  <------ this line is in hamcrest format
    //            [[stack should] haveCountOf:3];

    });

我的测试无法运行。它只是冻结了,我不得不手动杀死它。

主要是我想坚持使用 OCMockito,因为我熟悉并喜欢它(不太喜欢 OCHamcrest)。

我想知道是否有人可以帮助我解决这个问题?

【问题讨论】:

  • 所以澄清一下:OCHamcrest 本身并不是很重要,因为 Kiwi 有自己的断言风格。但你确实想要 OCMockito(这取决于 OCHamcrest)。
  • 是的,乔恩。我想你可以说我非常想要 Kiwi 的 OCmockito 和 OCHamcrest 会很高兴。

标签: ios tdd ocmockito ochamcrest


【解决方案1】:

这是一个猕猴桃错误。现在应该修好了。

https://github.com/allending/Kiwi/issues/206

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-11
    • 1970-01-01
    相关资源
    最近更新 更多