Riot-mongo_mapper is a project mainly written in Ruby, based on the MIT license.
riot macros for mongo_mapper
Riot assertions for MongoMapper
context "Photo Model" do
context 'definition' do
setup { Photo }
# field associations
asserts_topic.has_key :title, String
asserts_topic.has_key :caption, String, :default => ""
# association assertions
asserts_topic.has_association :many, :accounts
asserts_topic.has_association :one, :comments
asserts_topic.has_association :many, :persons, :in => :persons_id
# validation assertions
asserts_topic.has_validation :validates_presence_of, :caption
# plugin assertions
asserts_topic.has_plugin Plugins::SomePlugin
end
end
Copyright (c) 2010 Arthur Chiu. See LICENSE for details.