spec/integration/relations/registry_dsl_spec.rb in rom-0.4.2 vs spec/integration/relations/registry_dsl_spec.rb in rom-0.5.0
- old
+ new
@@ -13,12 +13,10 @@
restrict(title: title)
end
end
setup.relation(:users) do
- include ROM::RA
-
def with_tasks
join(tasks)
end
end
@@ -35,10 +33,10 @@
[name: "Jane", title: "be cool", priority: 2]
)
users = rom.relations.users
- expect(users.with_tasks.to_a).to eql(
+ expect(users.with_tasks).to match_array(
[{ name: "Joe", email: "joe@doe.org", title: "be nice", priority: 1 },
{ name: "Joe", email: "joe@doe.org", title: "sleep well", priority: 2 },
{ name: "Jane", email: "jane@doe.org", title: "be cool", priority: 2 }]
)
end