Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created July 21, 2010 22:01
Show Gist options
  • Save bernerdschaefer/485208 to your computer and use it in GitHub Desktop.
Save bernerdschaefer/485208 to your computer and use it in GitHub Desktop.
1) Mongoid::Persistence .create! inserting with a field that is not unique when a unique index exists raises an error
Failure/Error: lambda { Person.create!(:ssn => "555-55-9999") }.should raise_error
expected Exception but nothing was raised
# ./spec/integration/mongoid/persistence_spec.rb:34
# spec/integration/mongoid/association_attributes_spec.rb:3
2) Mongoid::Collections .index_information returns index information from the collection
Failure/Error: Person.index_information["title_1"].should_not be_nil
expected not nil, got nil
# ./spec/unit/mongoid/collections_spec.rb:53
# spec/integration/mongoid/association_attributes_spec.rb:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment