Rspec连接期望语句

时间:2017-05-12 21:16:17

标签: ruby-on-rails unit-testing testing rspec rspec-rails

expect(a).not_to be(6).or expect(a).to eq(6).and expect(b).to eq(3)

此代码不可执行。

但我想测试的是这句话:

(a == 6 AND b == 3) OR a != 6

如何在不使用if语句的情况下连接expect语句?

0 个答案:

没有答案