Module: CancanUnitTest::Mocks

Defined in:
lib/cancan_unit_test/mocks.rb

Instance Method Summary collapse

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 stub_load_and_authorize_collection_resource(model, options={}, &block)
  controller._add_cancan_unit_test_stub(:load_and_authorize_resource, :collection, model, options, &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 stub_load_and_authorize_singleton_resource(model, options={}, &block)
  controller._add_cancan_unit_test_stub(:load_and_authorize_resource, :singleton, model, options, &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, options={}, &block)
  controller._add_cancan_unit_test_stub(:load_resource, :singleton, model, options, &block)
end