写了一个很简单的测试
let(:coupon) { FactoryGirl.create(:coupon) }
it 'can update a coupon' do
      coupon
      expect{
        put :update, id: coupon.id, discount: 40
      }.to change(coupon, :discount)
end
我在 controller 里面添加了 debugger 确确实实的看到了 discount 值从 20 变到 40,但是为什么回到测试代码的时候值就🈶回到 20 了,怎么测都过不了