Displaying 1 result from an estimated 1 matches for "roles_proxy".
2007 Jan 29
0
mock.with(Hash) expects an Array ?
...rent_user).and_return(@user = mock("user"))
controller.stub!(:current_project).and_return(@project = mock("project"))
@user.stub!(:role_on).and_return(Role.owner)
end
specify "can change the role of a user" do
@project.should_receive(:roles).and_return(roles_proxy =
mock("roles proxy"))
roles_proxy.should_receive(:find).with("17").and_return(role = mock("role"))
role.should_receive(:update_attributes!).with(:name =>
Role.developer).and_return(true)
role.stub!(:name).and_return(Role.developer)
post :update, :p...