Skip to content

Commit 4a1cc07

Browse files
committed
Optimizing code
1 parent ef4d723 commit 4a1cc07

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

spec/acceptance/should_create_task_spec.rb

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@
6969
provider => 'taskscheduler_api2'
7070
}
7171
MANIFEST
72-
apply_manifest(pp, catch_failures: true)
7372

74-
# Ensure it's idempotent
75-
apply_manifest(pp, catch_changes: true)
73+
idempotent_apply(pp)
7674

7775
# Verify the task exists
7876
query_cmd = "schtasks.exe /query /v /fo list /tn #{taskname}"
@@ -94,10 +92,7 @@
9492
provider => 'win32_taskscheduler'
9593
}
9694
MANIFEST
97-
apply_manifest(pp, catch_failures: true)
98-
99-
# Ensure it's idempotent
100-
apply_manifest(pp, catch_changes: true)
95+
idempotent_apply(pp)
10196

10297
# Verify the task exists
10398
query_cmd = "schtasks.exe /query /v /fo list /tn #{taskname}"
@@ -392,10 +387,7 @@
392387
provider => 'taskscheduler_api2'
393388
}
394389
MANIFEST
395-
apply_manifest(pp, catch_failures: true)
396-
397-
# Ensure it's idempotent
398-
apply_manifest(pp, catch_changes: true)
390+
idempotent_apply(pp)
399391

400392
# Verify the task exists
401393
query_cmd = "schtasks.exe /query /v /fo list /tn #{taskname}"
@@ -418,10 +410,7 @@
418410
provider => 'win32_taskscheduler'
419411
}
420412
MANIFEST
421-
apply_manifest(pp, catch_failures: true)
422-
423-
# Ensure it's idempotent
424-
apply_manifest(pp, catch_changes: true)
413+
idempotent_apply(pp)
425414

426415
# Verify the task exists
427416
query_cmd = "schtasks.exe /query /v /fo list /tn #{taskname}"

0 commit comments

Comments
 (0)