diff --git a/spec/non_rails/uber_task/task_skipped_on_error_spec.rb b/spec/non_rails/uber_task/task_skipped_on_error_spec.rb index 4d9a525..fd86895 100644 --- a/spec/non_rails/uber_task/task_skipped_on_error_spec.rb +++ b/spec/non_rails/uber_task/task_skipped_on_error_spec.rb @@ -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' @@ -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 \ No newline at end of file +end