public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Ensure template runner tests don't depend on hash ordering [#1654 
state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
ffmike (author)
Sun Dec 28 08:57:37 -0800 2008
lifo (committer)
Sun Dec 28 09:49:58 -0800 2008
commit  1fb275541a58e6a2100261c6117e96e6c014cc6c
tree    24085ff7b288b34794e354739481829fefb52ca0
parent  fec0ea9d6d4ca56a09e3e83002c38d69c8ad924e
...
89
90
91
92
 
93
94
95
...
89
90
91
 
92
93
94
95
0
@@ -89,7 +89,7 @@ module Rails
0
       gems_code = "config.gem '#{name}'"
0
 
0
       if options.any?
0
-        opts = options.inject([]) {|result, h| result << [":#{h[0]} => '#{h[1]}'"] }.join(", ")
0
+        opts = options.inject([]) {|result, h| result << [":#{h[0]} => '#{h[1]}'"] }.sort.join(", ")
0
         gems_code << ", #{opts}"
0
       end
0
 
...
79
80
81
82
 
83
84
85
...
79
80
81
 
82
83
84
85
0
@@ -79,7 +79,7 @@ class RailsTemplateRunnerTest < GeneratorTestCase
0
 
0
   def test_gem_with_options_should_include_options_in_gem_dependency_in_environment
0
     run_template_method(:gem, 'mislav-will-paginate', :lib => 'will-paginate', :source => 'http://gems.github.com')
0
-    assert_rails_initializer_includes("config.gem 'mislav-will-paginate', :source => 'http://gems.github.com', :lib => 'will-paginate'")
0
+    assert_rails_initializer_includes("config.gem 'mislav-will-paginate', :lib => 'will-paginate', :source => 'http://gems.github.com'")
0
   end
0
 
0
   def test_environment_should_include_data_in_environment_initializer_block

Comments