Skip to content

Instantly share code, notes, and snippets.

@andrewpbrett
Created March 15, 2011 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewpbrett/870278 to your computer and use it in GitHub Desktop.
Save andrewpbrett/870278 to your computer and use it in GitHub Desktop.
describe User do
it "should add a user to an enrollment" do
plan = Plan.create(:name => "Aetna PPO")
don = User.create(:name => "Don")
don.plans << plan
don.enrollments.size.should == 1
betty = User.create(:name => "Betty")
betty.coenroll_with(don)
betty.enrollments.size.should == 1
don.cousers.should include(betty)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment