Sha256: 27a8dd592ee4b4ea0fbd154e2e14689da42533e5d72b1f3f2bcbc019075608e4

Contents?: true

Size: 1022 Bytes

Versions: 1

Compression:

Stored size: 1022 Bytes

Contents

require "spec_helper"

describe MongoBrowser::Entities::Database do
  let(:database) { double }
  subject(:database_entity) { described_class.new(database) }

  it { should expose :name }
  it { should expose :size }
  it { should expose :count }
end

describe MongoBrowser::Entities::Collection do
  let(:collection) { double }
  subject(:database_entity) { described_class.new(collection) }

  it { should expose :dbName }
  it { should expose :name }
  it { should expose :size }
end

describe MongoBrowser::Entities::Document do
  let(:document) { double }
  subject(:database_entity) { described_class.new(document) }

  it { should expose :id }
  it { should expose :dbName }
  it { should expose :collectionName }
  it { should expose :data }
end

describe MongoBrowser::Entities::PagedDocuments do
  let(:pager) { double }
  subject(:database_entity) { described_class.new(pager) }

  it { should expose :page }
  it { should expose :size }
  it { should expose :totalPages }
  it { should expose :documents }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo_browser-0.2.5 spec/lib/entities_spec.rb