Sha256: d7223824138e323b109341064e2d1ba7a3ed5529909cf70cc1c13c2e97fa5351

Contents?: true

Size: 733 Bytes

Versions: 1

Compression:

Stored size: 733 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

module Recliner
  describe Document do
    define_recliner_document :TestDocument
    
    subject { TestDocument.new }
    
    it "should behave like an ActiveModel object" do
      subject.to_model.should == subject
    end
    
    it "should have a model name" do
      name = TestDocument.model_name
      
      name.should == 'TestDocument'
      name.singular.should == 'test_document'
      name.plural.should == 'test_documents'
      name.element.should == 'test_document'
      name.collection.should == 'test_documents'
      name.partial_path.should == 'test_documents/test_document'
      name.human.should == 'test document'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
recliner-0.0.1 spec/recliner/document/active_model_spec.rb