Sha256: 579ceafcc643e07925d45a6fd989584fc57b3ad46ff23e4d6c179a0b6eae0efc

Contents?: true

Size: 540 Bytes

Versions: 1

Compression:

Stored size: 540 Bytes

Contents

class TestModel

  include DataMapper::Resource
  include DataMapper::Predefined

  # Name property to test String values
  property :name, String

  # Number property to test Integer values
  property :number, Integer

  # Optional property to test default values
  property :optional, String, :default => 'hello'

  # Body property to test Text values
  property :body, Text

  define :test1, :name => 'test1',
    :number => 1,
    :optional => 'yo',
    :body => %{This is a test.}

  define :test2, :name => 'test2', :number => 2

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-predefined-0.1.1 spec/integration/helpers/test_model.rb