HomePhorge

Modernize selector_spec, add Ruby 1.9.2 support, with bonus bugfix.
081965210626Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Modernize selector_spec, add Ruby 1.9.2 support, with bonus bugfix.

The spec was wildly out of date, and did horrible things with stubs and
instance variables. Instead, lets rewrite to use nice let methods, helper
functions, and a modern approach without stubbing the world.

This sets the stage for the relatively minor changes needed to support 1.9.2
in this particular area of the tests.

Finally, actually *testing* the code turned up a cosmetic bug in the string
output code: if you only had a single match value, which pretty much never
happens, you would represent it as:

... ? { "match", "value" }

The correct output, now implemented in a nasty, inefficient way, is:

... ? { "match" => "value" }

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU4f04f2df34ae: Define Symbol#intern if missing.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU081965210626: Modernize selector_spec, add Ruby 1.9.2 support, with bonus bugfix. (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM