Created
November 20, 2013 20:57
-
-
Save kalabiyau/7570870 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cancan/matchers' | |
require 'spec_helper' | |
describe Ability do | |
describe Invoice do | |
before(:each) do | |
Invoice.any_instance.stub(:debit_fee_percent => 10) | |
Invoice.any_instance.stub(:credit_fee_percent => 10) | |
end | |
it 'walker can create new invoice' do | |
current_user = FactoryGirl.create :walker_with_invoice | |
ability = Ability.new(current_user) | |
ability.should be_able_to(:create, Invoice.new) | |
end | |
... | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment