Sha256: b4e0b29a7338e62cc45f1fad25ad3cb563af0db87342b8d41bb180aaf64ebb28

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

require 'spec_helper'

describe "Document" do
  describe User do
    it { should have_fields(:email, :login) }
  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_not have_field(:allow_comments).of_type(Boolean).with_default_value_of(false) }
  end

  describe Article do
    it { should be_mongoid_document }
    it { should be_versioned_document }
    it { should be_timestamped_document }
    it { should be_paranoid_document }
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
mongoid-rspec-multi-db-1.4.4 spec/unit/document_spec.rb
mongoid-rspec-1.4.4 spec/unit/document_spec.rb