Sha256: 93c4ccaf840ae9d1b2a54ed2a26be6150053cc9221547b42ababada9ecf9b1e0

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

# encoding: UTF-8

require File.expand_path("./helper", File.dirname(__FILE__))

require "test/unit"
require "active_model"

class ActiveModelTest < Test::Unit::TestCase
  include ActiveModel::Lint::Tests

  class Post < Ohm::Model
    include Ohm::ActiveModelExtension

    attribute :body
    list :related, Post

    def validate
      assert_present :body
    end
  end

  def setup
    @model = Post.new
  end
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ohm-contrib-0.1.2 test/activemodel_test.rb
ohm-contrib-0.1.1 test/activemodel_test.rb