diff --git a/Tests/masTests/Commands/SearchSpec.swift b/Tests/masTests/Commands/SearchSpec.swift index 2496ad0..91a3a45 100644 --- a/Tests/masTests/Commands/SearchSpec.swift +++ b/Tests/masTests/Commands/SearchSpec.swift @@ -6,6 +6,7 @@ // Copyright © 2018 mas-cli. All rights reserved. // +import Foundation import Nimble import Quick @@ -31,9 +32,11 @@ public class SearchSpec: QuickSpec { ) storeSearch.apps[mockResult.trackId] = mockResult expect { - try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch) + try captureStream(stdout) { + try Mas.Search.parse(["slack"]).run(storeSearch: storeSearch) + } } - .toNot(throwError()) + == " 1111 slack (0.0)\n" } it("fails when searching for nonexistent app") { expect { diff --git a/Tests/masTests/Commands/UninstallSpec.swift b/Tests/masTests/Commands/UninstallSpec.swift index 13613b8..bf5890f 100644 --- a/Tests/masTests/Commands/UninstallSpec.swift +++ b/Tests/masTests/Commands/UninstallSpec.swift @@ -67,7 +67,7 @@ public class UninstallSpec: QuickSpec { try uninstall.run(appLibrary: mockLibrary) } } - == " 1111 slack (0.0)\n==> Some App /tmp/Some.app\n==> (not removed, dry run)\n" + == "==> Some App /tmp/Some.app\n==> (not removed, dry run)\n" } it("fails if there is a problem with the trash command") { var brokenUninstall = app // make mutable copy