Skip to content

Instantly share code, notes, and snippets.

@herestomwiththeweather
Created November 27, 2010 07:00
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 herestomwiththeweather/717659 to your computer and use it in GitHub Desktop.
Save herestomwiththeweather/717659 to your computer and use it in GitHub Desktop.
RSpec and CanCan Authorization for Intentional Economics
@e.amount = 1.0
@e.customer = @p2
@membership.roles = ['individual']
@membership.save
account = @p2.account(@g)
account.balance = 0.0
account.credit_limit = 0.5
account.save!
@ability.should_not be_able_to(:create,@e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment