Sha256: c60e3fd225ae588eba9104f6e5cb9a72a3c7d1e05c340b115120bc06b6580fbd

Contents?: true

Size: 495 Bytes

Versions: 5

Compression:

Stored size: 495 Bytes

Contents

require 'ronin/objectify'

require 'spec_helper'

describe Objectify do
  before(:all) do
    class TestObject

      include Objectify

      objectify :test

      property :id, Serial

      property :mesg, String

      parameter :x

      parameter :y

    end
  end

  it "should create an object with a Hash of attributes and params" do
    test = TestObject.new(:mesg => 'hello', :x => 3, :y => 9)

    test.mesg.should == 'hello'
    test.x.should == 3
    test.y.should == 9
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ronin-0.1.3 spec/objectify/objectify_spec.rb
ronin-0.1.4 spec/objectify/objectify_spec.rb
ronin-0.2.0 spec/objectify/objectify_spec.rb
ronin-0.2.2 spec/objectify/objectify_spec.rb
ronin-0.2.1 spec/objectify/objectify_spec.rb