HomePhorge

Provide wrapper method for new StringIO objects
297e93d8a761Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Provide wrapper method for new StringIO objects

Previously, StringIO objects were being created directly from
the provider methods. This worked just fine, except for the
fact that the StringIO objects were identified by a serial number.
When you would try to provide rspec test coverage around these
provider methods, you could never provide a complete match for
the StringIO objects as you would first need to mock StringIO.new,
and then hope that the serial numbers matched.

This commit wraps the StringIO.new method into its own provider
method called 'new_stringio_object', which makes it easier to mock
for rspec tests.

Details

Provenance
Gary Larizza <gary@puppetlabs.com>Authored on
Jeff McCune <jeff@puppetlabs.com>Committed on Dec 5 2012, 12:49 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU9ff9a804d88f: Do not fail if ShadowHashData doesn't exist
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff McCune <jeff@puppetlabs.com> committed rPU297e93d8a761: Provide wrapper method for new StringIO objects (authored by Gary Larizza <gary@puppetlabs.com>).Dec 5 2012, 12:49 AM