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

@@ -74,7 +74,8 @@ describe Verification::Management::Document do
verification_document = Verification::Management::Document.new("date_of_birth(3i)" => "1",
"date_of_birth(2i)" => "1",
"date_of_birth(1i)" => "1980")
expect(verification_document.errors[:date_of_birth].size).to eq(0)
expect(verification_document.errors[:date_of_birth]).to be_empty
end
it "is not valid without a date of birth" do