我的测试看起来像这样:
it 'does return an error when passing a non-subscription or trial membership' do
expect(helper.description_for_subscription(recurring_plan)).to raise_error(RuntimeError)
end
我的方法返回:
fail 'Unknown subscription model type!'
然而,Rspec带回了这条失败的消息:
Failure/Error: expect(helper.description_for_subscription(recurring_plan)).to raise_error(RuntimeError)
RuntimeError:
Unknown subscription model type!
到底是怎么回事??