Sha256: ae516c2b986a4f377a7e0ba0f58211000e0a77d8e56451dfc447ad756bc4c786

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

shared_examples_for "require 'dm-migrations'" do

  it "should include the migration api in the DataMapper namespace" do
    DataMapper.respond_to?(:migrate!                ).should be(true)
    DataMapper.respond_to?(:auto_migrate!           ).should be(true)
    DataMapper.respond_to?(:auto_upgrade!           ).should be(true)
    DataMapper.respond_to?(:auto_migrate_up!,   true).should be(true)
    DataMapper.respond_to?(:auto_migrate_down!, true).should be(true)
  end

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

  it "should include the migration api into the adapter" do
    @adapter.respond_to?(:storage_exists?      ).should be(true)
    @adapter.respond_to?(:field_exists?        ).should be(true)
    @adapter.respond_to?(:upgrade_model_storage).should be(true)
    @adapter.respond_to?(:create_model_storage ).should be(true)
    @adapter.respond_to?(:destroy_model_storage).should be(true)
  end

end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
ardm-migrations-1.3.0 spec/isolated/require_spec.rb
ardm-migrations-1.2.1 spec/isolated/require_spec.rb
ardm-migrations-1.2.0 spec/isolated/require_spec.rb
dm-migrations-1.2.0 spec/isolated/require_spec.rb
dm-migrations-1.2.0.rc2 spec/isolated/require_spec.rb
dm-migrations-1.2.0.rc1 spec/isolated/require_spec.rb
dm-migrations-1.1.0 spec/isolated/require_spec.rb
dm-migrations-1.1.0.rc3 spec/isolated/require_spec.rb
dm-migrations-1.1.0.rc2 spec/isolated/require_spec.rb
dm-migrations-1.1.0.rc1 spec/isolated/require_spec.rb
dm-migrations-1.0.2 spec/isolated/require_spec.rb
dm-migrations-1.0.1 spec/isolated/require_spec.rb
dm-hibernate-migrations-1.0.0 spec/isolated/require_spec.rb
dm-migrations-1.0.0 spec/isolated/require_spec.rb
dm-migrations-1.0.0.rc3 spec/isolated/require_spec.rb