Sha256: 395494461f59924ee0db63a5c5c68eb718ed093b4d647fedabcde2ff552e3639

Contents?: true

Size: 449 Bytes

Versions: 1

Compression:

Stored size: 449 Bytes

Contents

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

module Ohm
  class Reference
    attr :model, :id

    def initialize(model, id)
    end

    def self.marshal_load(*args)
      1
    end
  end
end

class ReferencesTest < Test::Unit::TestCase
  class Referee < Ohm::Model
  end

  test "dump" do
    model = Referee.new.create

    ref = Ohm::Reference.new(Referee, 1)

    $redis["foo"] = ref

    #assert_equal Referee[1], $redis["foo"]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ohm-0.0.2 test/references_test.rb