IOPopenMonkeyPatch
PTYSpawnMonkeyPatch
OpenMonkeyPatch
- should
SpawnMonkeyPatch
be 2 patches (KernelSpawnMonkeyPatch
andProcessSpawnMonkeyPatch
)? - add
CommandStub#will_cause(&blk)
for specifying desired side effects - add
CommandStub#will_stdout(str)
&CommandStub#will_stderr(str)
. these will work differently for backtick than it will for system & exec. - ADD YARD DOCUMENTATION TO METHODS
- maybe add
CommandStub#with_stdin(str)
forspawn
? - maybe adding the ability to specify the order in which commands output to stdout vs. stderr (like, a sequence of outputs) would be useful? would definitely be fun to build, not sure how useful it would be though.
- FIX: fix bug in SpawnMonkeyPatch involving popen2e when commands were prevented from running.
- FIX: fixed an issue with our
spawn
monkey-patch receiving optional key-value parameters fromOpen3.popen2e
.
- FEATURE:
#to_output
is an alias of#and_output
- FEATURE:
#to_return
is an alias of#and_return
- FEATURE:
#to_exit
is an alias of#and_exit
- FEATURE:
#to_succeed
is an alias of#and_succeed
- FEATURE:
#to_fail
is an alias of#and_fail
- DEPRECATION:
#and_output
is deprecated and will be removed in 1.0.0. Use#to_output
instead. - DEPRECATION:
#and_return
is deprecated and will be removed in 1.0.0. Use#to_return
instead. - DEPRECATION:
#and_exit
is deprecated and will be removed in 1.0.0. Use#to_exit
instead. - DEPRECATION:
#and_succeed
is deprecated and will be removed in 1.0.0. Use#to_succeed
instead. - DEPRECATION:
#and_fail
is deprecated and will be removed in 1.0.0. Use#to_fail
instead.
- FEATURE: use
#and_succeed
to set an invocation's exit status to 0 - FEATURE: use
#and_fail
to set an invocation's exit status to 1 - FIX:
ShellMock.disable
now resets thelet_commands_run
flag, preventing that from carrying between tests
- FEATURE:
CommandStub#and_output
can be used on command stubs to set the output of a command without setting the exit status. - ENHANCEMENT:
Kernel#spawn
,Kernel.spawn
, &Process.spawn
are now implemented well enough thatOpen3.capture3
behaves as though spawn is not being monkey-patched when ShellMock is enabled (and therefore, spawn most definitely is being monkey-patched). This should apply to all ofOpen3
's methods, since they all delegate toOpen3.popen_run
orOpen3.pipeline_run
, both of which internally useKernel#spawn
, however I only have a spec forOpen3.capture3
.
- FEATURE:
Kernel#spawn
andKernel.spawn
are now supported
- FIX:
exec
'd calls now registered as having been called
- FIX: fixed patched
exec
's handling of exit statuses
- FIX:
Kernel.`
,Kernel.exec
, andKernel.system
are now all supported as well. This is useful to testing thor suites that shell out, because thor (for reasons passing understanding) redefines#exec
, so we have to resort toKernel.exec
.
- FEATURE: you can now stub & mock
Kernel#exec
.
- FIX: fixed a test ordering bug