Skip to content

Commit 3efa106

Browse files
committed
Add a test helper to prevent duplication
1 parent 02636c5 commit 3efa106

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130

131131
# Helpers
132132
config.include IndexesHelpers
133+
config.include TaskHelpers
133134
config.include ExceptionsHelpers
134135
config.include DumpsHelpers
135136
end

spec/support/task_helpers.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
module TaskHelpers
4+
def wait_for_it(task)
5+
raise('The param `task` does not have an uid key.') unless task.key?('uid')
6+
7+
client.wait_for_task(task['uid'])
8+
end
9+
end

0 commit comments

Comments
 (0)