spec/integration/relations/reading_spec.rb in rom-0.4.1 vs spec/integration/relations/reading_spec.rb in rom-0.4.2
- old
+ new
@@ -30,12 +30,14 @@
expect(user.email).to eql 'jane@doe.org'
end
it 'maps grouped relations' do
setup.relation(:users) do
+ include ROM::RA
+
def with_tasks
- in_memory { group(join(tasks), tasks: [:title, :priority]) }
+ join(tasks)
end
def sorted
order(:name)
end
@@ -76,11 +78,13 @@
)
end
it 'maps wrapped relations' do
setup.relation(:users) do
+ include ROM::RA
+
def with_task
- in_memory { wrap(join(tasks), task: [:title, :priority]) }
+ join(tasks)
end
def sorted
order(:name)
end