Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created September 18, 2008 04:55
Show Gist options
  • Save dchelimsky/11374 to your computer and use it in GitHub Desktop.
Save dchelimsky/11374 to your computer and use it in GitHub Desktop.
describe SavingsAccount do
it_should fullfill_role("account") do |contract|
contract.overdraft do |account|
initial_balance = account.balance
account.withdraw(initial_balance + 1)
account.balance.should == initial_balance
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment