Sha256: 7fea00d803f1c62327fe390d1f34d08c1e30bb62beb3f5b97ea7594233cd5f5b

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

require 'spec_helper'

describe Hari::Entity::Repository do

  specify '.create, .find' do
    model = TestEntity.create(name: 'Ze', birth: '2012-04-20', points: '300')
    model.id.should be

    found = TestEntity.find(model.id)
    found.birth.year.should == 2012
    found.birth.month.should == 4
    found.birth.day.should == 20
    found.points.should == 300
    found.name.should == 'Ze'

    model2 = TestEntity.create(name: 'Jo', birth: '2009-03-21', points: '404')

    founds = TestEntity.find(model.id, model2.id)
    founds.size.should == 2
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hari-0.0.4 spec/hari/entity/repository_spec.rb
hari-0.0.3 spec/hari/entity/repository_spec.rb