Skip to content

Instantly share code, notes, and snippets.

@anathematic
Created April 20, 2010 15:08
Show Gist options
  • Save anathematic/372600 to your computer and use it in GitHub Desktop.
Save anathematic/372600 to your computer and use it in GitHub Desktop.
ContractIsp has many ContractIspPayables
it "should automatically create a contract_payable based on the payable out information provided (with three created if share is selected)" do
## Not sure how to approach building this in the model...
@contract_isp.update_attribute(:payable_by, "me")
@contract_isp.contract_isp_payables.size.should eql(1)
@contract_isp.update_attribute(:payable_by, "you")
@contract_isp.contract_isp_payables.size.should eql(3)
@contract_isp.update_attribute(:payable_by, "me")
@contract_isp.contract_isp_payables.size.should eql(1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment