Sha256: 3380852271c67715100ab1f5d6822e61d5a555c8c0e7a5a1f56c8a0086042863

Contents?: true

Size: 837 Bytes

Versions: 5

Compression:

Stored size: 837 Bytes

Contents

require 'couchbase-orm/utilities/properties_always_exists_in_document'

class DummyClass
  extend CouchbaseOrm::PropertiesAlwaysExistsInDocument
end

class DummyClass2
  extend CouchbaseOrm::PropertiesAlwaysExistsInDocument
end

RSpec.describe CouchbaseOrm::PropertiesAlwaysExistsInDocument do

  describe '#properties_always_exists_in_document=' do
    it 'Checks properties_always_exists_in_document value when initialize or not' do
      DummyClass.properties_always_exists_in_document = true
      expect(DummyClass.properties_always_exists_in_document).to be(true)
      expect(DummyClass2.properties_always_exists_in_document).to be(false)
    end

    it 'raises error when a non boolean value is passed' do
      expect { DummyClass.properties_always_exists_in_document = 'toto' }.to raise_error(ArgumentError)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
couchbase-orm-2.0.4 spec/utilities/properties_always_exists_in_document_spec.rb
couchbase-orm-2.0.3 spec/utilities/properties_always_exists_in_document_spec.rb
couchbase-orm-2.0.2 spec/utilities/properties_always_exists_in_document_spec.rb
couchbase-orm-2.0.1 spec/utilities/properties_always_exists_in_document_spec.rb
couchbase-orm-2.0.0 spec/utilities/properties_always_exists_in_document_spec.rb