Remarkable matchers for MongoMapper.
it { should have_key(:name, String) }
it { should have_keys(:name, :phone_number, String) }
it { should validate_presence_of(:name, :phone_number, :message => "not there!") }
it { should belong_to(:user, :class_name => 'Person') }
it { should have_many(:users, :class_name => 'Person', :polymorphic => true) }
- Finish validate_length_of
It is far from complete! It'd be very helpful to have some help.
- Nicolas Mérouze