Sha256: 6e0470ec74cad70d93d13071881379209a05c7232346892573ad80426c1d20ef
Contents?: true
Size: 484 Bytes
Versions: 2
Compression:
Stored size: 484 Bytes
Contents
RSpec.describe ROM::Relation, '#project' do subject(:relation) { container.relations.users } include_context 'users and tasks' before do conf.relation(:users) do def sorted order(:id) end end end with_adapters do it 'projects the dataset using new column names' do projected = relation.sorted.project(:name) expect(projected.header).to match_array([:name]) expect(projected.first).to eql(name: 'Jane') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rom-sql-0.9.1 | spec/unit/relation/project_spec.rb |
rom-sql-0.9.0 | spec/unit/relation/project_spec.rb |