mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
Merge pull request #268 from mas-cli/lint-cleanup
✅ Add tests for OpenSystemCommand
This commit is contained in:
commit
3858fe0761
2 changed files with 33 additions and 0 deletions
29
MasKitTests/ExternalCommands/OpenSystemCommandSpec.swift
Normal file
29
MasKitTests/ExternalCommands/OpenSystemCommandSpec.swift
Normal file
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// OpenSystemCommandSpec.swift
|
||||
// MasKitTests
|
||||
//
|
||||
// Created by Ben Chatelain on 2/24/20.
|
||||
// Copyright © 2020 mas-cli. All rights reserved.
|
||||
//
|
||||
|
||||
@testable import MasKit
|
||||
import Nimble
|
||||
import Quick
|
||||
|
||||
class OpenSystemCommandSpec: QuickSpec {
|
||||
override func spec() {
|
||||
describe("open system command") {
|
||||
|
||||
context("binary path") {
|
||||
it("defaults to the macOS open command") {
|
||||
let cmd = OpenSystemCommand()
|
||||
expect(cmd.binaryPath) == "/usr/bin/open"
|
||||
}
|
||||
it("can be overridden") {
|
||||
let cmd = OpenSystemCommand(binaryPath: "/dev/null")
|
||||
expect(cmd.binaryPath) == "/dev/null"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -104,6 +104,7 @@
|
|||
F83213A22173DC13008BA8A0 /* Commandant.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB406B213F4DDD0044E445 /* Commandant.framework */; };
|
||||
F83213A82173F5A7008BA8A0 /* MasKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FB715220F2B41400F56FDC /* MasKit.framework */; };
|
||||
F83213A92173F5D0008BA8A0 /* Commandant.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 90CB406B213F4DDD0044E445 /* Commandant.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
F88CB8E12404DAAD00B691B5 /* OpenSystemCommandSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88CB8E02404DAAD00B691B5 /* OpenSystemCommandSpec.swift */; };
|
||||
F8FB715B20F2B41400F56FDC /* MasKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8FB715220F2B41400F56FDC /* MasKit.framework */; };
|
||||
F8FB716220F2B41400F56FDC /* MasKit.h in Headers */ = {isa = PBXBuildFile; fileRef = F8FB715420F2B41400F56FDC /* MasKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F8FB716A20F2B4DD00F56FDC /* Downloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0F238A1B87569C00AE40CD /* Downloader.swift */; };
|
||||
|
@ -314,6 +315,7 @@
|
|||
F83213A42173EF75008BA8A0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
F83213A52173EF75008BA8A0 /* StoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreFoundation.framework; path = ../../../../../../../System/Library/PrivateFrameworks/StoreFoundation.framework; sourceTree = "<group>"; };
|
||||
F83213A62173EF75008BA8A0 /* CommerceKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CommerceKit.framework; path = ../../../../../../../System/Library/PrivateFrameworks/CommerceKit.framework; sourceTree = "<group>"; };
|
||||
F88CB8E02404DAAD00B691B5 /* OpenSystemCommandSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenSystemCommandSpec.swift; sourceTree = "<group>"; };
|
||||
F8FB715220F2B41400F56FDC /* MasKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MasKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F8FB715420F2B41400F56FDC /* MasKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MasKit.h; sourceTree = "<group>"; };
|
||||
F8FB715520F2B41400F56FDC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
|
@ -470,6 +472,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
B5DBF81621E02E3400F3B151 /* OpenSystemCommandMock.swift */,
|
||||
F88CB8E02404DAAD00B691B5 /* OpenSystemCommandSpec.swift */,
|
||||
);
|
||||
path = ExternalCommands;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1061,6 +1064,7 @@
|
|||
B55B3D9221ED9B8C0009A1A5 /* SearchResultFormatterSpec.swift in Sources */,
|
||||
B594B13C21D6D72E00F3AC59 /* SignInCommandSpec.swift in Sources */,
|
||||
B594B13A21D6D70400F3AC59 /* SignOutCommandSpec.swift in Sources */,
|
||||
F88CB8E12404DAAD00B691B5 /* OpenSystemCommandSpec.swift in Sources */,
|
||||
B576FDF921E107CA0016B39D /* SoftwareProductMock.swift in Sources */,
|
||||
B5DBF81521E02BA900F3B151 /* StoreSearchMock.swift in Sources */,
|
||||
B576FE3521E98AAE0016B39D /* StoreSearchSpec.swift in Sources */,
|
||||
|
|
Loading…
Reference in a new issue