Class: CancanUnitTest::StubFinder
- Inherits:
-
Object
- Object
- CancanUnitTest::StubFinder
- Defined in:
- lib/cancan_unit_test/stub_finder.rb
Instance Method Summary collapse
- #find_by_collection(model, options) ⇒ Object
- #find_by_singleton(model, options) ⇒ Object
-
#initialize(controller, method) ⇒ StubFinder
constructor
A new instance of StubFinder.
Constructor Details
#initialize(controller, method) ⇒ StubFinder
Returns a new instance of StubFinder.
4 5 6 |
# File 'lib/cancan_unit_test/stub_finder.rb', line 4 def initialize(controller, method) @stub_list = controller._get_cancan_unit_test_stubs(method) end |
Instance Method Details
#find_by_collection(model, options) ⇒ Object
12 13 14 |
# File 'lib/cancan_unit_test/stub_finder.rb', line 12 def find_by_collection(model, ) find_by_resource_type(model, :collection, ) end |
#find_by_singleton(model, options) ⇒ Object
8 9 10 |
# File 'lib/cancan_unit_test/stub_finder.rb', line 8 def find_by_singleton(model, ) find_by_resource_type(model, :singleton, ) end |