spec/unit/sql/relation_spec.rb in rom-repository-0.0.1 vs spec/unit/sql/relation_spec.rb in rom-repository-0.0.2

- old
+ new

@@ -3,17 +3,13 @@ shared_context 'valid view' do let(:users) { rom.relation(:users) } it 'has valid column names' do - expect(users.columns).to eql([:id, :name]) + expect(users.attributes).to eql([:id, :name]) - expect(users.by_id.columns).to eql([:name]) - expect(users.by_id(1).columns).to eql([:name]) - end - - it 'defines a valid method with correct arity' do - expect(users.relation.method(:by_id).arity).to be(1) + expect(users.by_id.attributes).to eql([:name]) + expect(users.by_id(1).attributes).to eql([:name]) end end describe '.view' do context 'using short syntax' do