Use isEmpty / beEmpty().

Partial #592

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
Ross Goldberg 2024-10-21 07:35:16 -04:00
parent d7074db06f
commit 06a347c450
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ extension Mas {
throw error as? MASError ?? .searchFailed
}
guard apps.count > 0 else {
guard !apps.isEmpty else {
printWarning("Nothing found to upgrade")
return
}

View file

@ -25,7 +25,7 @@ public class AppListsFormatterSpec: QuickSpec {
products = []
}
it("formats nothing as empty string") {
expect(format(products)) == ""
expect(format(products)).to(beEmpty())
}
it("can format a single product") {
let product = SoftwareProductMock(

View file

@ -25,7 +25,7 @@ public class SearchResultsFormatterSpec: QuickSpec {
results = []
}
it("formats nothing as empty string") {
expect(format(results, false)) == ""
expect(format(results, false)).to(beEmpty())
}
it("can format a single result") {
let result = SearchResult(