Sha256: 13e9ab5a12e69913ca3ca646fa2b83f085cd42aba5025eb7d98f75d5806cecfa

Contents?: true

Size: 563 Bytes

Versions: 1

Compression:

Stored size: 563 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class TestDmModel < Test::Unit::TestCase
  context "the property_string method" do
    setup {  @dm_model =  DmModel.new }
    should "generate correct property_strings" do
      { "datetime" => "DateTime", "integer" => "Integer",
        "string" => "String", "text" => "Text", "serial" => "Serial"}.each do |goaloc_type, dm_type|
        field_name = "ab" + ("C" * rand(10))
        assert_equal "property :#{field_name}, #{dm_type}", DmModel.property_string(field_name, goaloc_type)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mattknox-goaloc-0.4.7 test/test_dm_model.rb