传递非订阅或试用成员资格时确实会返回错误expect(helper.description_for_subscription(recurring_plan)).to raise_error(RuntimeError)结束
我的方法返回:
失败’未知订阅模型类型!’
然而,Rspec带回了这条失败的消息:
失败/错误:期望(helper.description_for_subscription(recurring_plan)).to raise_error(RuntimeError)RuntimeError:未知的订阅模型类型!
到底是怎么回事??
expect{ helper.description_for_subscription(recurring_plan) }.to raise_error(RuntimeError)
检查期望错误部分here