alphagov/puppet-aptly — pull request #4 by dcarley (2014-05-08 07:27:43+00:00)
Title: Sort config hash to appease Ruby 1.8

Sort the config hash by the key name to appease Ruby 1.8 which doesn't
preserve the order of hashes. This was causing the matrix tests in TravisCI
to fail non-deterministically, such as PR #3.

We have to cast the type again by using `Hash[]` because `#sort` returns an
array of array pairs. Whilst `#to_pson` will convert back if the original
hash was populated, it won't if the hash was empty and just produces an
empty array of `[]` causing the previous test to fail.

I've changed the name of the tests to reflect the extra work they're doing.

---

/cc @alphagov/team-infrastructure-admins