Sha256: 36dd43fde43284fe6df0f897226142ac5e3753b40158ccd3a780a067577af3d8

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

require 'spec_helper'

describe PgComment::ConnectionAdapters::AbstractAdapter do

  class AbstractAdapterStub
    include ::PgComment::ConnectionAdapters::AbstractAdapter
  end

  let(:adapter_stub){ AbstractAdapterStub.new }

  it 'should not support comments by default' do
    adapter_stub.supports_comments?.should be_false
  end

  it 'should define method stubs for comment methods' do
    [ :set_table_comment,
      :set_column_comment,
      :set_column_comments,
      :remove_table_comment,
      :remove_column_comment,
      :remove_column_comments,
      :set_index_comment,
      :remove_index_comment ].each { |method_name| adapter_stub.respond_to?(method_name).should be_true }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pg_comment-0.2.1 spec/lib/pg_comment/connection_adapters/abstract/schema_statements_spec.rb
pg_comment-0.2.0 spec/lib/pg_comment/connection_adapters/abstract/schema_statements_spec.rb