Sha256: 993f93617aadf15167b2358d897064f988ba4fbc5dc1694ee0dd631f5b731951

Contents?: true

Size: 739 Bytes

Versions: 5

Compression:

Stored size: 739 Bytes

Contents

require 'pathname'
require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper'

describe DataMapper::Ambition::Model do
  def self.loaded
    false
  end

  before :all do
    class ::User
      include DataMapper::Resource

      property :id,    Serial
      property :name,  String
      property :admin, Boolean, :default => false
    end

    if DataMapper.respond_to?(:auto_migrate!)
      DataMapper.auto_migrate!
    end
  end

  before :all do
    @repository = DataMapper.repository(:default)
    @model      = User

    @user  = @model.create(:name => 'Dan Kubb', :admin => true)
    @other = @model.create(:name => 'Sam Smoot')

    @subject = @model
  end

  it_should_behave_like 'it has public filter methods'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dm-ambition-1.0.0 spec/public/model_spec.rb
dm-ambition-1.0.0.rc3 spec/public/model_spec.rb
dm-ambition-1.0.0.rc2 spec/public/model_spec.rb
dm-ambition-1.0.0.rc1 spec/public/model_spec.rb
dm-ambition-0.10.2 spec/public/model_spec.rb