Skip to content

Instantly share code, notes, and snippets.

@mwise
Created March 30, 2012 05:07
Show Gist options
  • Save mwise/2246669 to your computer and use it in GitHub Desktop.
Save mwise/2246669 to your computer and use it in GitHub Desktop.
describe "#all_projects" do
before(:each) do
@user = Factory(:user)
@owned_project = Factory(:project, :owner => @user)
@project_user1 = Factory(:project_user, :user => @user)
@project_user2 = Factory(:project_user, :user => @user)
end
it "should return two projects" do
@user.all_projects.count.should == 3
end
end
######
def all_projects
all_projects = self.owned_projects
all_projects << projects
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment