Skip to content

Commit

Permalink
Updated Rubocop policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Un3x committed Sep 11, 2023
1 parent d81af6d commit ffd3f1b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,10 @@ Lint/AmbiguousBlockAssociation:

Rails/HasAndBelongsToMany:
Enabled: false

Rails/FindEach:
Enabled: false

Rails/RedundantActiveRecordAllMethod:
Exclude:
- "spec/**/*"
2 changes: 1 addition & 1 deletion spec/features/api_entreprise/endpoints/index_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rails_helper'

RSpec.describe 'Endpoints index', app: :api_entreprise do
let(:sample_endpoint) { APIEntreprise::Endpoint.all.first }
let(:sample_endpoint) { APIEntreprise::Endpoint.first }

it 'displays endpoints with basic info and link to show' do
visit endpoints_path
Expand Down
2 changes: 1 addition & 1 deletion spec/features/api_entreprise/faq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
end

it 'displays entries' do
expect(page).to have_css('.faq-entry', count: APIEntreprise::FAQEntry.all.count)
expect(page).to have_css('.faq-entry', count: APIEntreprise::FAQEntry.count)
end

it 'has a button to copy anchors on titles', :js do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/api_particulier/faq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
end

it 'displays entries' do
expect(page).to have_css('.faq-entry', count: APIParticulier::FAQEntry.all.count)
expect(page).to have_css('.faq-entry', count: APIParticulier::FAQEntry.count)
end

it 'has a button to copy anchors on titles', :js do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/api_entreprise/endpoint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
it { is_expected.to be_an_instance_of(Array) }

describe 'an element' do
subject { described_class.all.first }
subject { described_class.first }

it { is_expected.to be_an_instance_of(described_class) }
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/api_entreprise/faq_entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
it { expect(faq_entries.count).to be >= 1 }

describe 'one element' do
subject(:faq_entry) { described_class.all.first }
subject(:faq_entry) { described_class.first }

it { is_expected.to be_a(described_class) }
it { expect(faq_entry.slug).to be_present }
Expand Down
2 changes: 1 addition & 1 deletion spec/models/api_particulier/faq_entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
it { expect(faq_entries.count).to be >= 1 }

describe 'one element' do
subject(:faq_entry) { described_class.all.first }
subject(:faq_entry) { described_class.first }

it { is_expected.to be_a(described_class) }
it { expect(faq_entry.slug).to be_present }
Expand Down
2 changes: 1 addition & 1 deletion spec/stores/api_entreprise/endpoints_store_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
end

describe 'an element' do
subject { described_class.all.first }
subject { described_class.first }

it { is_expected.to have_key('uid') }
it { is_expected.to have_key('path') }
Expand Down

0 comments on commit ffd3f1b

Please sign in to comment.