Skip to content

Commit

Permalink
Correctly define _id as bson ordered hash.
Browse files Browse the repository at this point in the history
The reason the modifier tests were failing is because in #attributes, _id was being converted to a hash with indifferent access instead of staying a bson ordered hash.
  • Loading branch information
jnunemaker committed Oct 22, 2012
1 parent 942003c commit 197c2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/functional/test_modifiers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ModifierTest < Test::Unit::TestCase
def setup
compound_key = BSON::OrderedHash['n', 42, 'i', BSON::ObjectId.new]
@page_class_with_compound_key = Doc do
key :_id, :default => lambda { compound_key }
key :_id, BSON::OrderedHash, :default => lambda { compound_key }
key :title, String
key :day_count, Integer, :default => 0
key :week_count, Integer, :default => 0
Expand Down

0 comments on commit 197c2f6

Please sign in to comment.