Use eq to match arrays with 1 element

It's shorter, and easy to read.
This commit is contained in:
Javi Martín
2019-09-26 17:39:57 +02:00
parent a04a289850
commit f69a0336a5

View File

@@ -45,7 +45,8 @@ describe UserSegments do
create(:proposal, :retired, author: user1)
all_proposal_authors = UserSegments.all_proposal_authors
expect(all_proposal_authors).to contain_exactly(user1)
expect(all_proposal_authors).to eq [user1]
end
end