diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2008-12-09 20:36:24 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-12-10 09:07:47 -0800 |
commit | 355f41d8aafd75d76db25cdda4736e0052b0605c (patch) | |
tree | 0dca4b27bcb61c24d38f28f34f7c6cbdc5ac4596 /activerecord | |
parent | 014b7994ac1a829845e2882f4c852bc28bd2aa53 (diff) | |
download | rails-355f41d8aafd75d76db25cdda4736e0052b0605c.tar.gz rails-355f41d8aafd75d76db25cdda4736e0052b0605c.tar.bz2 rails-355f41d8aafd75d76db25cdda4736e0052b0605c.zip |
Rework ActiveSupport::OrderedHash to make lookups faster
[#1352 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/calculations_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index 8bd0dd0f6e..080f6a7007 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -171,8 +171,9 @@ class CalculationsTest < ActiveRecord::TestCase Account.expects(:columns).at_least_once.returns([column]) c = Account.count(:all, :group => :firm) - assert_equal Firm, c.first.first.class - assert_equal 1, c.first.last + first_key = c.keys.first + assert_equal Firm, first_key.class + assert_equal 1, c[first_key] end end |