Created
March 30, 2012 05:07
-
-
Save mwise/2246669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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