Sha256: c24fa5b321c7d8418e7646e9ee728dfd9fc8cd6658f8bd2dbb8dd29e52528735

Contents?: true

Size: 633 Bytes

Versions: 4

Compression:

Stored size: 633 Bytes

Contents

require 'rspec'

require_relative 'require_spec'
require 'dm-core/spec/setup'

# To really test this behavior, this spec needs to be run in isolation and not
# as part of the typical rake spec run, which requires dm-transactions upfront
class ::Person
  include DataMapper::Resource
  property :id, Serial
end

if %w(postgres mysql sqlite oracle sqlserver).include?(ENV['ADAPTER'])
  describe "require 'dm-migrations' after calling DataMapper.setup" do
    before(:all) do
      @adapter = DataMapper::Spec.adapter
      require 'dm-migrations'

      @model = Person
    end

    it_behaves_like "require 'dm-migrations'"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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