Skip to content

Commit 8fc2b6b

Browse files
committed
Fix empty block warnings in jetstream_bridge_spec
Replace empty blocks with blocks that explicitly return nil to avoid Lint/EmptyBlock warnings. Use proper argument names with underscores for unused block parameters. All RuboCop checks now pass with zero offenses detected.
1 parent 9584010 commit 8fc2b6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/jetstream_bridge_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,26 @@
8888
end
8989

9090
it 'returns consumer instance when run: false' do
91-
consumer = described_class.subscribe {}
91+
consumer = described_class.subscribe { nil }
9292
expect(consumer).to be_a(JetstreamBridge::Consumer)
9393
end
9494

9595
it 'returns thread when run: true' do
9696
allow_any_instance_of(JetstreamBridge::Consumer).to receive(:run!)
9797

98-
result = described_class.subscribe(run: true) {}
98+
result = described_class.subscribe(run: true) { nil }
9999
expect(result).to be_a(Thread)
100100
result.kill # Clean up thread
101101
end
102102

103103
it 'accepts handler as first argument' do
104-
handler = -> {}
104+
handler = ->(_event, _context) {}
105105
consumer = described_class.subscribe(handler)
106106
expect(consumer).to be_a(JetstreamBridge::Consumer)
107107
end
108108

109109
it 'accepts custom durable_name and batch_size' do
110-
consumer = described_class.subscribe(durable_name: 'custom', batch_size: 50) {}
110+
consumer = described_class.subscribe(durable_name: 'custom', batch_size: 50) { nil }
111111
expect(consumer.durable).to eq('custom')
112112
expect(consumer.batch_size).to eq(50)
113113
end

0 commit comments

Comments
 (0)