Skip to content

Commit

Permalink
Merge pull request #2302 from sul-dlss/fix-copypasta
Browse files Browse the repository at this point in the history
okcomputer spec touchups
  • Loading branch information
justinlittman authored Jan 11, 2024
2 parents d73866d + c022354 commit cca37cf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/config/okcomputer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
end

describe RabbitQueueExistsCheck do
subject(:rabbit_queue_exists_check) { described_class.new([queue_name1, queue_name2]) }

let(:bunny_conn) { instance_double(Bunny::Session) }
let(:queue_name1) { 'foo.first_queue' }
let(:queue_name2) { 'foo.second_queue' }
Expand All @@ -54,17 +56,17 @@
let(:queue_exists1) { true }
let(:queue_exists2) { true }

it 'succeeds if the expected queue exists' do
expect(described_class.new([queue_name1, queue_name2])).to be_successful
it 'succeeds if the expected queues exist' do
expect(rabbit_queue_exists_check).to be_successful
end
end

context 'when a queue is missing' do
let(:queue_exists1) { true }
let(:queue_exists2) { false }

it 'succeeds if the expected queue exists' do
expect(described_class.new([queue_name1, queue_name2])).not_to be_successful
it 'fails if an expected queue is missing' do
expect(rabbit_queue_exists_check).not_to be_successful
end
end
end
Expand Down

0 comments on commit cca37cf

Please sign in to comment.