我有一个简单的rspec测试,在升级到3.2.6后失败了。
以下是users_controller_spec.rb中的规范
describe "show action" do
before(:each) do
User.stub!(:find).with(@user.id).and_return(@user)
end
def do_get
get :show, :id => @user.id
end
it "should be successful" do
do_get
response.should be_success
end
end
这是错误
1) UsersController show action should be successful
Failure/Error: get :show, :id => @user.id
.........................
(class)> received :find with unexpected arguments
expected: (2)
got: ("2")
不确定哪里出错了。 show动作在控制器中没有任何内容,它只是
def show
end