Displaying 1 result from an estimated 1 matches for "role_on".
2007 Jan 29
0
mock.with(Hash) expects an Array ?
...this before.
Here''s my spec:
context "A project owner" do
controller_name :roles
setup do
controller.stub!(:current_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_rece...