Module: AbilityTestHelper

Defined in:
lib/mno_enterprise/testing_support/ability_test_helper.rb

Instance Method Summary collapse

Instance Method Details

#stub_abilityObject



3
4
5
6
7
8
# File 'lib/mno_enterprise/testing_support/ability_test_helper.rb', line 3

def stub_ability
  ability = Object.new
  ability.extend(::CanCan::Ability)
  allow(controller).to receive(:current_ability).and_return(ability)
  ability
end