Skip to content

Commit

Permalink
fix rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronLasseigne committed Jan 10, 2021
1 parent aa60431 commit 84ec7e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ AllCops:
- example/db/schema.rb
- tmp/**/*
- vendor/**/*
- bin/**/*
ClassLength:
Max: 120
Documentation:
Expand Down
6 changes: 3 additions & 3 deletions lib/active_interaction/concerns/runnable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def run
self.result = run_callbacks(:execute) do
begin
execute
rescue Interrupt => interrupt
errors.backtrace = interrupt.errors.backtrace || interrupt.backtrace
errors.merge!(interrupt.errors)
rescue Interrupt => e
errors.backtrace = e.errors.backtrace || e.backtrace
errors.merge!(e.errors)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/active_interaction/errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class B < ActiveRecord::Base

it 'merges the nested errors' do
a.valid?
expect(a.errors.messages).to eql(:'b.name' => ["can't be blank"])
expect(a.errors.messages).to eql('b.name': ["can't be blank"])
expect(a.errors.size).to eql 1
expect { errors.merge!(a.errors) }.to_not raise_error
expect(errors.size).to eql 1
Expand Down

0 comments on commit 84ec7e7

Please sign in to comment.