Sha256: feac514ceafa8a58a8720b8ec92734097472f09a01cfa5eb2797208ed71e0e3e

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

require 'spec_helper'

describe ROM::Adapter do
  subject(:adapter) { rom.postgres.adapter }

  let(:setup) { ROM.setup(postgres: "postgres://localhost/rom") }
  let(:rom) { setup.finalize }

  describe '#dataset?' do
    it 'returns true if a table exists' do
      expect(adapter.dataset?(:users)).to be(true)
    end

    it 'returns false if a table does not exist' do
      expect(adapter.dataset?(:not_here)).to be(false)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rom-sql-0.3.0 spec/unit/adapter_spec.rb
rom-sql-0.2.0 spec/unit/adapter_spec.rb