Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道相当于:
event.should be_live
在 Minitest 中?我正在测试的方法是:
event.live?
目前我正在使用:
conf.live?.must_equal true
但在我看来,这很做作。
较新版本的 minitest 允许在assert_operator. 规范 DSL 中对此的期望是must_be. 所以你的代码看起来像:
assert_operator
must_be
event.must_be :live?