Skip to content

Commit 0928ca4

Browse files
committed
Rubocop fixes
1 parent 6ec979f commit 0928ca4

File tree

49 files changed

+274
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+274
-73
lines changed

spec/builders/better_together/builder_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def cleared? = @cleared
2929
end
3030

3131
describe '.build' do
32-
it 'calls seed_data without clear when clear: false' do # rubocop:todo RSpec/MultipleExpectations
32+
it 'calls seed_data without clear when clear: false' do
3333
expect(subclass).to receive(:seed_data) # rubocop:todo RSpec/MessageSpies
3434
expect(subclass).not_to receive(:clear_existing) # rubocop:todo RSpec/MessageSpies
3535
subclass.build(clear: false)
3636
end
3737

38-
it 'calls clear_existing and seed_data when clear: true' do # rubocop:todo RSpec/MultipleExpectations
38+
it 'calls clear_existing and seed_data when clear: true' do
3939
expect(subclass).to receive(:clear_existing).ordered # rubocop:todo RSpec/MessageSpies
4040
expect(subclass).to receive(:seed_data).ordered # rubocop:todo RSpec/MessageSpies
4141
subclass.build(clear: true)

spec/channels/better_together/messages_channel_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
stub_connection(current_person: person)
1010
end
1111

12-
it 'streams for the current person on subscribe' do # rubocop:todo RSpec/MultipleExpectations
12+
it 'streams for the current person on subscribe' do
1313
subscribe
1414
expect(subscription).to be_confirmed
1515
expect(subscription).to have_stream_for(person)

spec/controllers/better_together/person_blocks_controller_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
describe 'GET #search' do # rubocop:todo RSpec/MultipleMemoizedHelpers
1818
let!(:john_doe) { create(:better_together_person, name: 'John Doe', privacy: 'public') }
1919

20-
it 'returns searchable people as JSON' do # rubocop:todo RSpec/ExampleLength, RSpec/MultipleExpectations
20+
it 'returns searchable people as JSON' do # rubocop:todo RSpec/ExampleLength
2121
get :search, params: { locale: locale, q: 'John' }, format: :json
2222

2323
expect(response).to have_http_status(:success)
@@ -28,7 +28,7 @@
2828
expect(json_response.first['value']).to eq(john_doe.id.to_s)
2929
end
3030

31-
it 'excludes already blocked people from search results' do # rubocop:todo RSpec/MultipleExpectations
31+
it 'excludes already blocked people from search results' do
3232
blocked_user = create(:better_together_person, name: 'Blocked User', privacy: 'public')
3333
create(:person_block, blocker: person, blocked: blocked_user)
3434

@@ -38,7 +38,7 @@
3838
expect(JSON.parse(response.body)).to be_empty
3939
end
4040

41-
it 'excludes current user from search results' do # rubocop:todo RSpec/MultipleExpectations
41+
it 'excludes current user from search results' do
4242
get :search, params: { locale: locale, q: person.name }, format: :json
4343

4444
expect(response).to have_http_status(:success)
@@ -111,7 +111,7 @@
111111
context 'when not authenticated' do
112112
before { sign_out user }
113113

114-
it 'redirects to sign in' do # rubocop:todo RSpec/MultipleExpectations
114+
it 'redirects to sign in' do
115115
get :index, params: { locale: locale }
116116
expect(response).to have_http_status(:redirect)
117117
expect(response.location).to include('/users/sign-in')
@@ -134,7 +134,7 @@
134134
context 'when not authenticated' do
135135
before { sign_out user }
136136

137-
it 'redirects to sign in' do # rubocop:todo RSpec/MultipleExpectations
137+
it 'redirects to sign in' do
138138
get :new, params: { locale: locale }
139139
expect(response).to have_http_status(:redirect)
140140
expect(response.location).to include('/users/sign-in')
@@ -244,7 +244,7 @@
244244
context 'when not authenticated' do
245245
before { sign_out user }
246246

247-
it 'redirects to sign in' do # rubocop:todo RSpec/MultipleExpectations
247+
it 'redirects to sign in' do
248248
post :create, params: { locale: locale, person_block: { blocked_id: blocked_person.id } }
249249
expect(response).to have_http_status(:redirect)
250250
expect(response.location).to include('/users/sign-in')
@@ -293,7 +293,7 @@
293293
context 'when not authenticated' do # rubocop:todo RSpec/MultipleMemoizedHelpers
294294
before { sign_out user }
295295

296-
it 'redirects to sign in' do # rubocop:todo RSpec/MultipleExpectations
296+
it 'redirects to sign in' do
297297
delete :destroy, params: { locale: locale, id: person_block.id }
298298
expect(response).to have_http_status(:redirect)
299299
expect(response.location).to include('/users/sign-in')

spec/features/checklist_create_appends_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
login_as(manager, scope: :user)
1313
end
1414

15-
# rubocop:todo RSpec/MultipleExpectations
1615
it 'creates a new checklist item and it appears at the bottom after refresh' do # rubocop:todo RSpec/ExampleLength
1716
# rubocop:enable RSpec/MultipleExpectations
1817
checklist = create(:better_together_checklist, title: 'Append Test Checklist')

spec/features/conversations_client_validation_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
end
1616

1717
# rubocop:todo RSpec/ExampleLength
18-
# rubocop:todo RSpec/MultipleExpectations
1918
it 'prevents submission and shows client-side validation when first message is empty' do
2019
# rubocop:enable RSpec/MultipleExpectations
2120
visit better_together.new_conversation_path(locale: I18n.default_locale,

spec/features/events/location_selector_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
RSpec.feature 'Event location selector', :as_platform_manager, :js do
66
# rubocop:todo RSpec/ExampleLength
7-
# rubocop:todo RSpec/MultipleExpectations
87
scenario 'shows inline new address and building blocks', skip: 'temporarily disabled (location selector flakiness)' do
98
# rubocop:enable RSpec/MultipleExpectations
109
visit better_together.new_event_path(locale: I18n.default_locale)

spec/features/joatu/invalid_inputs_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'rails_helper'
44

55
RSpec.feature 'Joatu invalid inputs' do
6-
scenario 'fails to create a request without a name' do # rubocop:todo RSpec/MultipleExpectations
6+
scenario 'fails to create a request without a name' do
77
person = create(:better_together_person)
88
request = BetterTogether::Joatu::Request.new(description: 'Need help', creator: person)
99

spec/features/joatu/respond_with_offer_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
let(:owner_user) { create(:user, :confirmed) }
99
let(:responder_user) { create(:user, :confirmed) }
1010
let(:request_resource) { create(:better_together_joatu_request, creator: owner_user.person) }
11-
# rubocop:todo RSpec/MultipleExpectations
1211
scenario 'shows respond with offer button and redirects with source params' do # rubocop:todo RSpec/ExampleLength
1312
# rubocop:enable RSpec/MultipleExpectations
1413

spec/features/notifications/unread_badge_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
RSpec.describe 'notification badge' do
66
context 'with platform manager role' do
7-
it 'updates badge and title based on unread count', :js do # rubocop:todo RSpec/ExampleLength, RSpec/MultipleExpectations
7+
it 'updates badge and title based on unread count', :js do # rubocop:todo RSpec/ExampleLength
88
visit conversations_path(locale: I18n.default_locale)
99
original_title = page.title
1010

spec/features/setup_wizard_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
RSpec.feature 'Setup Wizard Flow', :js, skip: 'flaky/setup_wizard - disabled while debugging suite' do
66
# rubocop:todo RSpec/ExampleLength
7-
# rubocop:todo RSpec/MultipleExpectations
87
scenario 'redirects from root and completes the first wizard step using platform attributes' do
98
# rubocop:enable RSpec/MultipleExpectations
109
# Build a platform instance (using FactoryBot) with test data

0 commit comments

Comments
 (0)