Module: CancanUnitTest::Mocks
- Defined in:
- lib/cancan_unit_test/mocks.rb
Instance Method Summary collapse
- #stub_load_and_authorize_collection_resource(model, options = {}, &block) ⇒ Object
- #stub_load_and_authorize_singleton_resource(model, options = {}, &block) ⇒ Object
- #stub_load_singleton_resource(model, options = {}, &block) ⇒ Object
Instance Method Details
#stub_load_and_authorize_collection_resource(model, options = {}, &block) ⇒ Object
8 9 10 |
# File 'lib/cancan_unit_test/mocks.rb', line 8 def (model, ={}, &block) controller._add_cancan_unit_test_stub(:load_and_authorize_resource, :collection, model, , &block) end |
#stub_load_and_authorize_singleton_resource(model, options = {}, &block) ⇒ Object
4 5 6 |
# File 'lib/cancan_unit_test/mocks.rb', line 4 def (model, ={}, &block) controller._add_cancan_unit_test_stub(:load_and_authorize_resource, :singleton, model, , &block) end |
#stub_load_singleton_resource(model, options = {}, &block) ⇒ Object
12 13 14 |
# File 'lib/cancan_unit_test/mocks.rb', line 12 def stub_load_singleton_resource(model, ={}, &block) controller._add_cancan_unit_test_stub(:load_resource, :singleton, model, , &block) end |