Skip to content

Commit

Permalink
Use shared example to raise error in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagodiaz committed Oct 4, 2023
1 parent a30e2ac commit ae92a88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/lib/active_outbox/outboxable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
before do
# active_outbox = instance_double(ActiveOutbox)
# allow(ActiveOutbox).to receive(:new).and_return(active_outbox)
# byebug
allow(ActiveOutbox.configuration).to receive(:outbox_mapping).and_return({ 'default' => nil })
end

it 'raises an error' do
expect { save_instance }.to raise_error(ActiveOutbox::OutboxClassNotFoundError)
end
include_examples 'raises an error and does not create neither the record nor the outbox record',
ActiveOutbox::OutboxClassNotFoundError
end
end

Expand Down

0 comments on commit ae92a88

Please sign in to comment.