Check arrays are empty instead of size 0

In ruby we check for `array.empty?` instead of `array.size == 0`, so
it's natural to write the tests in the same way.
This commit is contained in:
Javi Martín
2019-09-24 20:49:26 +02:00
parent 98fe8349d7
commit 4301937e85
9 changed files with 15 additions and 12 deletions

View File

@@ -762,7 +762,7 @@ describe Debate do
it "does not return any debates when user has not interests" do
create(:debate)
expect(Debate.recommendations(user).size).to eq 0
expect(Debate.recommendations(user)).to be_empty
end
it "returns debates ordered by cached_votes_total" do