lib/bolt_spec/bolt_context.rb in bolt-3.17.0 vs lib/bolt_spec/bolt_context.rb in bolt-3.18.0
- old
+ new
@@ -37,17 +37,19 @@
# an otherwise empty bolt config and inventory. To create your own values for
# these override the modulepath, config, or inventory methods.
#
# Stubs:
# - allow_command(cmd), expect_command(cmd): expect the exact command
-# - allow_script(script), expect_script(script): expect the script as <module>/path/to/file
+# - allow_script(script), expect_script(script): expect the script as <module>/path/to/file or an absolute path
# - allow_task(task), expect_task(task): expect the named task
# - allow_download(file), expect_download(file): expect the identified source file
-# - allow_upload(file), expect_upload(file): expect the identified source file
+# - allow_upload(file), expect_upload(file): expect the source file as <module>/path/to/file or an absolute path
# - allow_out_message, expect_out_message: expect a message to be passed to out::message (only modifiers are
# be_called_times(n), with_params(params), and not_be_called)
#
+# Files with absolute path (for upload and script) must exist or those functions will fail.
+#
# Stub modifiers:
# - be_called_times(n): if allowed, fail if the action is called more than 'n' times
# if expected, fail unless the action is called 'n' times
# - not_be_called: fail if the action is called
# - with_targets(targets): target or list of targets that you expect to be passed to the action
@@ -209,11 +211,11 @@
# arguments is an array instead of a hash though
# so it probably should be set separately
# def allow_script(script_name)
#
# file uploads and downloads have a single destination and no arguments
- # def allow_file_upload(source_name)
- # def allow_file_download(source_name)
+ # def allow_upload(source_name)
+ # def allow_download(source_name)
#
# Most of the information in commands is in the command string itself
# we may need more flexible allows than just the name/command string
# Only option params exist on a command.
# def allow_command(command)