cancan/spec
Ryan Bates b73bd062a8 Merge pull request #564 from flop/master
False positives on multiple nested abilities definitions
2012-05-10 10:59:08 -07:00
..
cancan Merge pull request #564 from flop/master 2012-05-10 10:59:08 -07:00
matchers.rb adding Gemfile, to get specs running just bundle and rake - closes #163 2010-10-05 10:09:37 -07:00
README.rdoc adding spec_all rake task to spec readme 2010-12-30 15:51:57 -08:00
spec_helper.rb quick fix to get nested resources working again - closes #482 2011-10-04 15:02:59 -07:00
spec.opts passing a hash to can? will check permissions on association, this is done automatically in authorize_resource - closes #121 2010-09-03 11:01:55 -07:00

= CanCan Specs

== Running the specs

To run the specs first run the +bundle+ command to install the necessary gems and the +rake+ command to run the specs.

  bundle
  rake

The specs currently require Ruby 1.8.7. Ruby 1.9.2 support will be coming soon.


== Model Adapters

CanCan offers separate specs for different model adapters (such as Mongoid and Data Mapper). By default it will use Active Record but you can change this by setting the +MODEL_ADAPTER+ environment variable before running. You can run the +bundle+ command with this as well to ensure you have the installed gems.

  MODEL_ADAPTER=data_mapper bundle
  MODEL_ADAPTER=data_mapper rake

The different model adapters you can specify are:

* active_record (default)
* data_mapper
* mongoid

You can also run the +spec_all+ rake task to run specs for each adapter.

  rake spec_all