假设我有这个代码:
require 'spec_helper'
describe "authorization" do
describe "for non-signed-in users" do
let(:user) { FactoryGirl.create(:user) }
describe "in the Users controller" do
describe "submitting to the update action" do
before { put user_path(user) }
specify { response.should redirect_to(signin_path) }
end
end
end
end
代替:
指定 { response.should redirect_to(signin_path) }
为什么我不能使用:
它的 { response.should redirect_to(signin_path) }