You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using rubocop-rspec (1.38.1)
this cop raises a violation for a block in which there are only shared_example calls
Example using cancancan ability_spec
RSpec.configure do |config|
config.alias_it_behaves_like_to :is_able_to, 'is able to'
end
RSpec.shared_examples 'perform search' do
it { is_expected.to be_able_to(%i[new create], SearchFilter) }
it { is_expected.to be_able_to(%i[new create], Search) }
end
RSpec.describe Ability, type: :model do
subject(:ability) { described_class.new(user) }
# cop violated on this block
# rubocop:disable RSpec/EmptyExampleGroup
context 'when a manager' do
let(:user) { create(:user, roles: ['manager']) }
is_able_to 'perform search'
end
# rubocop:enable RSpec/EmptyExampleGroup
end
The text was updated successfully, but these errors were encountered:
using rubocop-rspec (1.38.1)
this cop raises a violation for a block in which there are only shared_example calls
Example using cancancan ability_spec
The text was updated successfully, but these errors were encountered: