Skip to content

Commit

Permalink
Fix cop rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrinlopes committed Jul 31, 2024
1 parent 4056859 commit b2b3891
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spec/non_rails/uber_task/task_skipped_on_error_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# frozen_string_literal: true

describe UberTask::SkipTask do
it 'Skips the task on a error' do
task_skipped_after_exception = false

UberTask.run do
UberTask.on_subtask_error do |_task, _event, err|
if err.message == 'Some error'
Expand All @@ -10,11 +12,11 @@
end
end

UberTask.run do
UberTask.run do
raise 'Some error' if task_skipped_after_exception == false
end
end

expect(task_skipped_after_exception).to be(true)
end
end
end

0 comments on commit b2b3891

Please sign in to comment.