Module: LegacyMixlib::ShellOut::Helper
- Includes:
- ChefUtils::DSL::PathSanity, ChefUtils::Internal
- Defined in:
- src/mintpress-common/lib/legacymixlib/shellout/helper.rb
Defined Under Namespace
Classes: FakeShellOut
Instance Method Summary collapse
Instance Method Details
#shell_out(*args, **options) ⇒ Object
PREFERRED APIS:
all consumers should now call shell_out!/shell_out.
the shell_out_compacted/shell_out_compacted! APIs are private but are intended for use
in rspec tests, and should ideally always be used to make code refactoring that do not
change behavior easier:
allow(provider).to receive(:shell_out_compacted!).with("foo", "bar", "baz")
provider.shell_out!("foo", [ "bar", nil, "baz"])
provider.shell_out!(["foo", nil, "bar" ], ["baz"])
note that shell_out_compacted also includes adding the magical timeout option to force
people to setup expectations on that value explicitly. it does not include the default_env
mangling in order to avoid users having to setup an expectation on anything other than
setting `default_env: false` and allow us to make tweak to the default_env without breaking
a thousand unit tests.