Sha256: 76dae795f3cbd5414fe5b577dd3ce9d590c3fe168beb9d507a80af73c1324dd1

Contents?: true

Size: 634 Bytes

Versions: 3

Compression:

Stored size: 634 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' before calling DataMapper.setup" do
    before(:all) do
      require 'dm-migrations'
      @adapter = DataMapper::Spec.adapter

      @model = Person
    end

    it_behaves_like "require 'dm-migrations'"
  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_before_setup_spec.rb
sbf-dm-migrations-1.3.0 spec/isolated/require_before_setup_spec.rb
sbf-dm-migrations-1.3.0.beta spec/isolated/require_before_setup_spec.rb