Permalink
Browse files

Ensure template runner tests don't depend on hash ordering [#1654 sta…

…te:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent fec0ea9 commit 1fb275541a58e6a2100261c6117e96e6c014cc6c @ffmike ffmike committed with lifo Dec 28, 2008
@@ -89,7 +89,7 @@ def gem(name, options = {})
gems_code = "config.gem '#{name}'"
if options.any?
- opts = options.inject([]) {|result, h| result << [":#{h[0]} => '#{h[1]}'"] }.join(", ")
+ opts = options.inject([]) {|result, h| result << [":#{h[0]} => '#{h[1]}'"] }.sort.join(", ")
gems_code << ", #{opts}"
end
@@ -79,7 +79,7 @@ def test_gem_should_put_gem_dependency_in_enviroment
def test_gem_with_options_should_include_options_in_gem_dependency_in_environment
run_template_method(:gem, 'mislav-will-paginate', :lib => 'will-paginate', :source => 'http://gems.github.com')
- assert_rails_initializer_includes("config.gem 'mislav-will-paginate', :source => 'http://gems.github.com', :lib => 'will-paginate'")
+ assert_rails_initializer_includes("config.gem 'mislav-will-paginate', :lib => 'will-paginate', :source => 'http://gems.github.com'")
end
def test_environment_should_include_data_in_environment_initializer_block

0 comments on commit 1fb2755

Please sign in to comment.