Sha256: 1ca40d42c9d9c3b61c23c1b177df1e951efb69a74a3f81cb06155a9e6a6b04bb

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

shared_examples "require 'dm-migrations'" do
  it 'includes the migration api in the DataMapper namespace' do
    expect(DataMapper.respond_to?(:migrate!)).to be(true)
    expect(DataMapper.respond_to?(:auto_migrate!)).to be(true)
    expect(DataMapper.respond_to?(:auto_upgrade!)).to be(true)
    expect(DataMapper.respond_to?(:auto_migrate_up!, true)).to be(true)
    expect(DataMapper.respond_to?(:auto_migrate_down!, true)).to be(true)
  end

  %w(Repository Model).each do |name|
    it "includes the migration api in DataMapper::#{name}" do
      expect(DataMapper.const_get(name) < DataMapper::Migrations.const_get(name)).to be(true)
    end
  end

  it 'includes the migration api into the adapter' do
    expect(@adapter.respond_to?(:storage_exists?)).to be(true)
    expect(@adapter.respond_to?(:field_exists?)).to be(true)
    expect(@adapter.respond_to?(:upgrade_model_storage)).to be(true)
    expect(@adapter.respond_to?(:create_model_storage)).to be(true)
    expect(@adapter.respond_to?(:destroy_model_storage)).to be(true)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sbf-dm-migrations-1.4.0.beta.1 spec/isolated/require_spec.rb
sbf-dm-migrations-1.3.0 spec/isolated/require_spec.rb
sbf-dm-migrations-1.3.0.beta spec/isolated/require_spec.rb