Skip to content

Commit

Permalink
add message to exceptions for preview AR versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rbritom committed May 7, 2017
1 parent 82d89b3 commit cef2a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/acts_as_taggable_on/tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@

context 'retry 3 times on not unique exception' do
it 'performs 3 tries before raising the exception' do
allow(ActsAsTaggableOn::Tag).to receive(:named_any).and_raise(ActiveRecord::RecordNotUnique) # trigger error inside block
allow(ActsAsTaggableOn::Tag).to receive(:named_any).and_raise(ActiveRecord::RecordNotUnique.new('error')) # trigger error inside block
expect(ActiveRecord::Base.connection).to receive(:execute).with('ROLLBACK').exactly(3).times

expect {
Expand Down

0 comments on commit cef2a52

Please sign in to comment.