Skip to content

Commit

Permalink
Fixed some more Moped BSON issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael O'Keefe committed Jul 17, 2014
1 parent 25f6b2a commit 5e666d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def collection_fixtures2(collection, subattr, *id_attributes)# the collection, t
end

if fixture_json[attr].kind_of? Array
fixture_json[attr] = fixture_json[attr].collect{|att| Moped::BSON::ObjectId(att)}
fixture_json[attr] = fixture_json[attr].collect{|att| BSON::ObjectId.from_string(att)}
else
fixture_json[attr] = Moped::BSON::ObjectId(fixture_json[attr])
fixture_json[attr] = BSON::ObjectId.from_string(fixture_json[attr])
end
end

Expand All @@ -70,9 +70,9 @@ def collection_fixtures2(collection, subattr, *id_attributes)# the collection, t
end

if fixture_json[subattr][attr].kind_of? Array
fixture_json[subattr][attr] = fixture_json[subattr][attr].collect{|att| Moped::BSON::ObjectId(att)}
fixture_json[subattr][attr] = fixture_json[subattr][attr].collect{|att| BSON::ObjectId.from_string(att)}
else
fixture_json[subattr][attr] = Moped::BSON::ObjectId(fixture_json[subattr][attr])
fixture_json[subattr][attr] = BSON::ObjectId.from_string(fixture_json[subattr][attr])
end
end

Expand Down

0 comments on commit 5e666d0

Please sign in to comment.