CancanUnitTest
RSpec helpers to easily stub CanCan's load_and_authorize_resource methods for better controller unit testing
Installation
Add this line to your application's Gemfile:
gem 'cancan_unit_test'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cancan_unit_test
Usage
stub_load_and_authorize_singleton_resource(:model_name, options_hash) stub_load_and_authorize_collection_resource(:model_name, options_hash)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request