Sha256: 40276b8114f7a2f82b9af4b05e2c31aa91e5b14a0fd68a9057a5561b0108250e

Contents?: true

Size: 968 Bytes

Versions: 10

Compression:

Stored size: 968 Bytes

Contents

require 'spec_helper'

describe "Document" do
  describe User do
    it { should have_fields(:email, :login) }
    it { should be_timestamped_document }
    it { should be_timestamped_document.with(:created) }
    it { should_not be_timestamped_document.with(:updated) }
  end

  describe Article do
    it { should have_field(:published).of_type(Boolean).with_default_value_of(false) }
    it { should have_field(:allow_comments).of_type(Boolean).with_default_value_of(true) }
    it { should belong_to(:author) }
    it { should have_field(:title).localized }
    it { should_not have_field(:allow_comments).of_type(Boolean).with_default_value_of(false) }
    it { should_not have_field(:number_of_comments).of_type(Integer).with_default_value_of(1) }
    it { should be_mongoid_document }
    it { should be_versioned_document }
    it { should be_timestamped_document }
    it { should be_paranoid_document }
    it { should be_multiparameted_document }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mongoid-rspec-1.13.0 spec/unit/document_spec.rb
mongoid-rspec-1.11.0 spec/unit/document_spec.rb
mongoid-rspec-1.10.0 spec/unit/document_spec.rb
mongoid-rspec-1.9.0 spec/unit/document_spec.rb
mongoid-rspec-1.8.2 spec/unit/document_spec.rb
mongoid-rspec-1.8.1 spec/unit/document_spec.rb
mongoid-rspec-1.8.0 spec/unit/document_spec.rb
mongoid-rspec-1.7.0 spec/unit/document_spec.rb
mongoid-rspec-1.6.0 spec/unit/document_spec.rb
mongoid-rspec-1.5.6 spec/unit/document_spec.rb