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.
我有这个:
builder.class.should.kind_of?(MyCustomFormBuilder)
我改成
expect(builder.class).to be kind_of?(MyCustomFormBuilder)
但我明白了
expected #<FalseClass:0> => false got #<Class:25336780> => MyCustomFormBuilder
我怎样才能做这个比较expect?
expect
切换自
到这种格式
expect(builder).to be_kind_of(MyCustomFormBuilder)
工作。
笔记:
builder
builder.class
be_kind_of
kind_of?