Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Template generator should use predictable order for gem options

#1654

test_gem_with_options_should_include_options_in_gem_dependency_in_environment is failing because the underlying code uses inject, which depends on Hash#each to order things, and the test assumes lexical order, which Hash#each does not guarantee.

In addition, Hash#each uses a different ordering in Ruby 1.9.

Attached patch (1) Sorts the generated options from TemplateRunner#gem so that we get predictable output regardless of Ruby version and (2) Fixes the test to assert that order.

Reported by CancelProfileIsBroken · December 28th, 2008 @ 05:01 PM

State: resolved
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [1fb275541a58e6a2100261c6117e96e6c014cc6c]) Ensure template runner tests don't depend on hash ordering [#1654 Template generator should use predictable order for gem options state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    December 28th, 2008 @ 05:51 PM