考虑这个例子:
describe UsersController do
it "works for something" do
# some other code
get :show, {facebook_id: 1000000000}
# some other code
put :update, {facebook_id: 1000000000, birthday: "2001-01-01"}
# some other code
get :show, {facebook_id: 1000000000}
# some other code
end
it "works for another thing" do
# some other code
get :show, {facebook_id: 1000000000}
# some other code
end
end
如何干燥,{facebook_id: 1000000000}
以便我可以简单地写get :show
,put :update, {birthday: "2001-01-01"}
等?