User.should_receive(:update_attributes).with({'these' => 'params'})
那句话是什么意思?these
没有在任何地方实例化为任何意义。
整个声明是这样的:
describe "with valid params" do
it "updates the requested user" do
User.should_receive(:find).with("37") { mock_user }
User.should_receive(:update_attributes).with({'these' => 'params'})
put :update, :id => "37", :user => {'these' => 'params'}
end
我这样说是因为我遇到了一个错误:
unknown attribute: these
这来自上述情况..