projects in a TDD manner, but this has left me with some early
I have this test written out:
describe User do
it "should add user to team" do
team = Team.create(:name => "Tigers")
akash = User.create(:name => "Akash")
akash.teams << team
akash.memberships.size.should == 1
john = User.create(:name => "John")
john.memberships.size.should == 1
Ideally, users may join many teams, and teams may have many members. If
a user is paired up with another user through "buddyup", those users
will share all of the same teams.
I've started on the User model, but I'm lost at this point. Can
somebody help me out? Here's what I have so far:
class User < ActiveRecord::Base
class Team < ActiveRecord::Base
All I want to do is pass the test, further functionality will be added
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.