Sha256: 163eece6e0f511ae65dc08a019dda9cbb4ddcbb4bf1f6d2077b345c76c023226

Contents?: true

Size: 792 Bytes

Versions: 11

Compression:

Stored size: 792 Bytes

Contents

require 'dm-core'
require 'dm-active_model'

require 'amo_interface_compliance_spec'

if ENV['DM_VALIDATIONS'] || ENV['AMO_VALIDATIONS']
  require 'dm-validations'
  require 'amo_validation_compliance_spec'
end

describe 'An active_model compliant DataMapper::Resource' do

  before :all do

    module ::ComplianceTest
      class ProfileInfo
        include DataMapper::Resource
        extend ActiveModel::Naming
        property :id, Serial
      end
    end

    DataMapper.setup(:default, { :adapter => :in_memory })

  end

  before :each do
    @model = ComplianceTest::ProfileInfo.new.to_model
  end

  it_should_behave_like 'an active_model compliant object'

  if ENV['AMO_VALIDATIONS'] == 'true'
    it_should_behave_like 'an active_model/validations compliant object'
  end

end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
ardm-active_model-1.3.0 spec/dm-active_model_spec.rb
ardm-active_model-1.2.0 spec/dm-active_model_spec.rb
tpitale-dm-active_model-1.3.0 spec/dm-active_model_spec.rb
dm-active_model-1.2.1 spec/dm-active_model_spec.rb
dm-active_model-1.2.0 spec/dm-active_model_spec.rb
dm-active_model-1.2.0.rc2 spec/dm-active_model_spec.rb
dm-active_model-1.2.0.rc1 spec/dm-active_model_spec.rb
dm-active_model-1.1.0 spec/dm-active_model_spec.rb
dm-active_model-1.1.0.rc3 spec/dm-active_model_spec.rb
dm-active_model-1.1.0.rc2 spec/dm-active_model_spec.rb
dm-active_model-1.1.0.rc1 spec/dm-active_model_spec.rb