Sha256: dc2e751c8ccf19bb9d88a5a32f724f6a6eb29d7eb27cdf36235119af5f95880b
Contents?: true
Size: 994 Bytes
Versions: 1
Compression:
Stored size: 994 Bytes
Contents
require "test_helper" describe Mongoid::Matchers::Document do subject { Person } it { must be_document } it { must be_paranoid } it { must be_versioned } it { must be_timestamped } it { must have_field(:name) } it { wont have_field(:noexist) } it { must have_field(:name).of_type(String) } it { wont have_field(:name).of_type(Integer) } it { must have_field(:name).with_default_value("me") } it { wont have_field(:name).with_default_value("nodefault") } it { must have_field(:name).of_type(String).with_default_value("me") } it { wont have_field(:name).of_type(String).with_default_value("nodefault") } it { must have_fields(:name, :login) } it { wont have_fields(:noexist, :noexistagain) } it { must have_fields(:name, :login).of_type(String) } it { wont have_fields(:name, :login).of_type(Integer) } it { must have_fields(:name, :login).with_default_value("me") } it { must have_fields(:name, :login).of_type(String).with_default_value("me") } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-minitest-0.0.1 | test/matchers/document_test.rb |