Sha256: 1ca40d42c9d9c3b61c23c1b177df1e951efb69a74a3f81cb06155a9e6a6b04bb
Contents?: true
Size: 1.03 KB
Versions: 4
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
4 entries across 4 versions & 1 rubygems