Sha256: 00b7db8feecd2b7000d0efc42fa970a7c0fadf471db943e4fbf247631508f294
Contents?: true
Size: 348 Bytes
Versions: 2
Compression:
Stored size: 348 Bytes
Contents
require 'spec_helper' describe 'User model mapping' do let(:rom) { ROM.env } let(:users) { rom.relation(:users).as(:users) } before do rom.relations.users.insert(name: 'Piotr', email: 'piotr@test.com') end it 'works' do piotr = User.new(id: 1, name: 'Piotr') expect(users.by_name('Piotr').to_a).to eql([piotr]) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rom-rails-0.3.0 | spec/dummy/spec/integration/user_model_mapping_spec.rb |
rom-rails-0.3.0.rc1 | spec/dummy/spec/integration/user_model_mapping_spec.rb |