diff --git a/Sources/mas/Commands/Upgrade.swift b/Sources/mas/Commands/Upgrade.swift index bd23d93..db825b6 100644 --- a/Sources/mas/Commands/Upgrade.swift +++ b/Sources/mas/Commands/Upgrade.swift @@ -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 } diff --git a/Tests/masTests/Formatters/AppListFormatterSpec.swift b/Tests/masTests/Formatters/AppListFormatterSpec.swift index 98ed50f..42346ae 100644 --- a/Tests/masTests/Formatters/AppListFormatterSpec.swift +++ b/Tests/masTests/Formatters/AppListFormatterSpec.swift @@ -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( diff --git a/Tests/masTests/Formatters/SearchResultFormatterSpec.swift b/Tests/masTests/Formatters/SearchResultFormatterSpec.swift index f92731d..10fec4b 100644 --- a/Tests/masTests/Formatters/SearchResultFormatterSpec.swift +++ b/Tests/masTests/Formatters/SearchResultFormatterSpec.swift @@ -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(