puppetlabs/puppet — pull request #436 by daniel-pittman (2012-02-01 18:08:24+00:00)
Title: Maint/2.7.4/stub upstart spec test in a portable way

Previously this spec used to execute an external command in order to set the
Ruby `$?` global to a `Process::Status` object with a successful exit. This
was fine, but not portable to Windows, and not exactly efficient.

Instead, we now stub the exitcode on the $? object, whatever it is, to report
successful exit, and carry on. That works, stubbing the instance, to make
this both fairly robust and entirely portable.

Signed-off-by: Daniel Pittman