From 60f83f0c95fe867994f2bf3728c7564368c232f4 Mon Sep 17 00:00:00 2001 From: muta Date: Mon, 11 Jan 2021 02:10:57 +0900 Subject: [PATCH 1/8] test: add code coverage from xcode --- .../xcshareddata/xcschemes/IGStoryButtonKit.xcscheme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IGStoryButtonKit.xcodeproj/xcshareddata/xcschemes/IGStoryButtonKit.xcscheme b/IGStoryButtonKit.xcodeproj/xcshareddata/xcschemes/IGStoryButtonKit.xcscheme index 4d29968..75987cf 100644 --- a/IGStoryButtonKit.xcodeproj/xcshareddata/xcschemes/IGStoryButtonKit.xcscheme +++ b/IGStoryButtonKit.xcodeproj/xcshareddata/xcschemes/IGStoryButtonKit.xcscheme @@ -26,7 +26,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> From ba65e148544c453a3159fc5780dbde01e59ebe6f Mon Sep 17 00:00:00 2001 From: muta Date: Mon, 11 Jan 2021 02:19:27 +0900 Subject: [PATCH 2/8] style: add indent --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2f1f96..db780c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,10 +16,10 @@ jobs: - platform=iOS Simulator,name=iPhone 11,OS=13.2.2 runs-on: macos-10.15 steps: - - uses: actions/checkout@v2 - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer - - name: Check Xcode version - run: xcodebuild -version - - name: Run tests - run: xcodebuild -project IGStoryButtonKit.xcodeproj -scheme IGStoryButtonKit -sdk iphonesimulator -destination "${{ matrix.destination }}" test \ No newline at end of file + - uses: actions/checkout@v2 + - name: Select Xcode + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer + - name: Check Xcode version + run: xcodebuild -version + - name: Run tests + run: xcodebuild -project IGStoryButtonKit.xcodeproj -scheme IGStoryButtonKit -sdk iphonesimulator -destination "${{ matrix.destination }}" test \ No newline at end of file From 837199babb4ed14ffba2b8f3706b6d867d32a2bf Mon Sep 17 00:00:00 2001 From: muta Date: Mon, 11 Jan 2021 11:10:30 +0900 Subject: [PATCH 3/8] fix: replace assert with precondition to stop app in release build --- IGStoryButtonKit/IGStoryButton.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IGStoryButtonKit/IGStoryButton.swift b/IGStoryButtonKit/IGStoryButton.swift index fd2c5ce..c3120be 100644 --- a/IGStoryButtonKit/IGStoryButton.swift +++ b/IGStoryButtonKit/IGStoryButton.swift @@ -142,7 +142,7 @@ public protocol IGStoryButtonDelegate: class { override public func layoutSubviews() { super.layoutSubviews() - assert(frame.width == frame.height, "The size of width and height are required to be equal") + precondition(frame.width == frame.height, "The size of width and height are required to be equal") // arrange layout configureLayout() } From 7e4578cdc164ca23e644db9fa37fa3501980b1df Mon Sep 17 00:00:00 2001 From: muta Date: Mon, 11 Jan 2021 17:37:29 +0900 Subject: [PATCH 4/8] test: cover init(frame:) --- IGStoryButtonKitTests/IGStoryButtonTest.swift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/IGStoryButtonKitTests/IGStoryButtonTest.swift b/IGStoryButtonKitTests/IGStoryButtonTest.swift index 7c115b9..440c62d 100644 --- a/IGStoryButtonKitTests/IGStoryButtonTest.swift +++ b/IGStoryButtonKitTests/IGStoryButtonTest.swift @@ -9,8 +9,16 @@ import XCTest @testable import IGStoryButtonKit final class IGStoryButtonTests: XCTestCase { - // MARK: - Unit tests - func testManipulateType() { + // MARK: - Unit tests for IGStoryButton + func testInitWithFrame() { + let storyButton = IGStoryButton() + XCTAssertEqual(storyButton.frame, .zero) + storyButton.frame = CGRect(x: 0, y: 0, width: 100, height: 100) + XCTAssertEqual(storyButton.frame.width, 100) + XCTAssertEqual(storyButton.frame.height, 100) + } + + func testDisplayTypeAndColorTypeIsValid() { let storyButton = IGStoryButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) let mockImage: UIImage? = .init() @@ -33,5 +41,4 @@ final class IGStoryButtonTests: XCTestCase { XCTAssertEqual(storyButton.colorType, .custom(colors: [.red, .green])) XCTAssertNotEqual(storyButton.colorType, .custom(colors: [.red])) } - } From aa1ef9f356c0ea81125b96b8050bd52f641b3dba Mon Sep 17 00:00:00 2001 From: muta Date: Mon, 11 Jan 2021 17:48:01 +0900 Subject: [PATCH 5/8] test: cover .unseen pattern --- IGStoryButtonKitTests/IGStoryButtonTest.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/IGStoryButtonKitTests/IGStoryButtonTest.swift b/IGStoryButtonKitTests/IGStoryButtonTest.swift index 440c62d..236bd1d 100644 --- a/IGStoryButtonKitTests/IGStoryButtonTest.swift +++ b/IGStoryButtonKitTests/IGStoryButtonTest.swift @@ -22,18 +22,19 @@ final class IGStoryButtonTests: XCTestCase { let storyButton = IGStoryButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) let mockImage: UIImage? = .init() - storyButton.condition = .init(display: .seen, color: .black) - XCTAssertEqual(storyButton.colorType, .black) - XCTAssertNotEqual(storyButton.colorType, .default) + storyButton.condition = .init(display: .seen) XCTAssertEqual(storyButton.displayType, .seen) - XCTAssertNotEqual(storyButton.displayType, .unseen) + XCTAssertEqual(storyButton.colorType, nil) + + storyButton.condition = .init(display: .unseen, color: .default) + XCTAssertEqual(storyButton.displayType, .unseen) + XCTAssertEqual(storyButton.colorType, .default) storyButton.condition = .init(display: .status(type: .color(of: .green))) - XCTAssertEqual(storyButton.colorType, nil) XCTAssertEqual(storyButton.displayType, .status(type: .color(of: .green))) XCTAssertNotEqual(storyButton.displayType, .status(type: .color(of: .red))) - storyButton.condition = .init(display: .status(type: .image(of: mockImage)), color: .default) + storyButton.condition = .init(display: .status(type: .image(of: mockImage))) XCTAssertEqual(storyButton.displayType, .status(type: .image(of: mockImage))) XCTAssertNotEqual(storyButton.displayType, .status(type: .image(of: nil))) From d465b91fc1c471b7b06d8f82de2a0ff9b780084f Mon Sep 17 00:00:00 2001 From: muta Date: Mon, 11 Jan 2021 19:36:14 +0900 Subject: [PATCH 6/8] test: cover delegate behavior --- IGStoryButtonKit.xcodeproj/project.pbxproj | 4 ++++ IGStoryButtonKitTests/IGStoryButtonTest.swift | 10 +++++++++ .../MockViewController.swift | 21 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 IGStoryButtonKitTests/MockViewController.swift diff --git a/IGStoryButtonKit.xcodeproj/project.pbxproj b/IGStoryButtonKit.xcodeproj/project.pbxproj index ec623bf..536372c 100644 --- a/IGStoryButtonKit.xcodeproj/project.pbxproj +++ b/IGStoryButtonKit.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ E20FF10C25A18D59002E39FA /* Const.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20FF10A25A18D59002E39FA /* Const.swift */; }; E20FF10D25A18D59002E39FA /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20FF10B25A18D59002E39FA /* Extensions.swift */; }; + E2599B9325AC5D050093E009 /* MockViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2599B9225AC5D050093E009 /* MockViewController.swift */; }; E27115D425A2CD6500B6ACA6 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27115D325A2CD6500B6ACA6 /* ContentView.swift */; }; E27115E725A2E1FC00B6ACA6 /* StoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27115E525A2E1FC00B6ACA6 /* StoryCell.swift */; }; E27115E825A2E1FC00B6ACA6 /* StoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E27115E625A2E1FC00B6ACA6 /* StoryCell.xib */; }; @@ -68,6 +69,7 @@ /* Begin PBXFileReference section */ E20FF10A25A18D59002E39FA /* Const.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Const.swift; sourceTree = ""; }; E20FF10B25A18D59002E39FA /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + E2599B9225AC5D050093E009 /* MockViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockViewController.swift; sourceTree = ""; }; E27115D325A2CD6500B6ACA6 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; E27115E525A2E1FC00B6ACA6 /* StoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryCell.swift; sourceTree = ""; }; E27115E625A2E1FC00B6ACA6 /* StoryCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StoryCell.xib; sourceTree = ""; }; @@ -186,6 +188,7 @@ isa = PBXGroup; children = ( E2CBC2F7259CD73700B92BA4 /* IGStoryButtonTest.swift */, + E2599B9225AC5D050093E009 /* MockViewController.swift */, E2CBC2F9259CD73700B92BA4 /* Info.plist */, ); path = IGStoryButtonKitTests; @@ -400,6 +403,7 @@ E2CBC2F8259CD73700B92BA4 /* IGStoryButtonTest.swift in Sources */, E271163325A485C600B6ACA6 /* Extensions.swift in Sources */, E271162725A482D300B6ACA6 /* IGStoryButton.swift in Sources */, + E2599B9325AC5D050093E009 /* MockViewController.swift in Sources */, E271162D25A4859B00B6ACA6 /* ContentView.swift in Sources */, E271162A25A4859900B6ACA6 /* StatusView.swift in Sources */, E271163025A485B600B6ACA6 /* Const.swift in Sources */, diff --git a/IGStoryButtonKitTests/IGStoryButtonTest.swift b/IGStoryButtonKitTests/IGStoryButtonTest.swift index 236bd1d..5a9f0cf 100644 --- a/IGStoryButtonKitTests/IGStoryButtonTest.swift +++ b/IGStoryButtonKitTests/IGStoryButtonTest.swift @@ -42,4 +42,14 @@ final class IGStoryButtonTests: XCTestCase { XCTAssertEqual(storyButton.colorType, .custom(colors: [.red, .green])) XCTAssertNotEqual(storyButton.colorType, .custom(colors: [.red])) } + + func testButtonEventIsCatched() { + let storyButton = IGStoryButton() + let viewController = MockViewController() + storyButton.delegate = viewController + storyButton.delegate?.didTapped() + storyButton.delegate?.didLongPressed() + XCTAssertTrue(viewController.isTapped) + XCTAssertTrue(viewController.isLongPressed) + } } diff --git a/IGStoryButtonKitTests/MockViewController.swift b/IGStoryButtonKitTests/MockViewController.swift new file mode 100644 index 0000000..f4cf5c8 --- /dev/null +++ b/IGStoryButtonKitTests/MockViewController.swift @@ -0,0 +1,21 @@ +// +// MockViewController.swift +// IGStoryButtonKitTests +// +// Created by k_muta on 2021/01/11. +// + +import UIKit + +final class MockViewController: UIViewController, IGStoryButtonDelegate { + var isTapped: Bool = false + var isLongPressed: Bool = false + + func didTapped() { + isTapped = true + } + + func didLongPressed() { + isLongPressed = true + } +} From 23b9368df89e98b1b337e49372097e397783fdd5 Mon Sep 17 00:00:00 2001 From: muta Date: Tue, 12 Jan 2021 12:00:11 +0900 Subject: [PATCH 7/8] test: cover precondition --- IGStoryButtonKit.xcodeproj/project.pbxproj | 24 ++++++++++++++++++ IGStoryButtonKit/IGStoryButton.swift | 8 +++++- .../Extension/XCTest+Precondition.swift | 25 +++++++++++++++++++ .../Helper/Precondition.swift | 15 +++++++++++ IGStoryButtonKitTests/IGStoryButtonTest.swift | 8 ++++++ 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 IGStoryButtonKitTests/Helper/Extension/XCTest+Precondition.swift create mode 100644 IGStoryButtonKitTests/Helper/Precondition.swift diff --git a/IGStoryButtonKit.xcodeproj/project.pbxproj b/IGStoryButtonKit.xcodeproj/project.pbxproj index 536372c..51f51e2 100644 --- a/IGStoryButtonKit.xcodeproj/project.pbxproj +++ b/IGStoryButtonKit.xcodeproj/project.pbxproj @@ -20,6 +20,8 @@ E271163025A485B600B6ACA6 /* Const.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20FF10A25A18D59002E39FA /* Const.swift */; }; E271163325A485C600B6ACA6 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20FF10B25A18D59002E39FA /* Extensions.swift */; }; E27C03D525A1EEF700A1D1FC /* StatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27C03D425A1EEF700A1D1FC /* StatusView.swift */; }; + E2C63AE025AD3D6300F76AD7 /* Precondition.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C63ADF25AD3D6300F76AD7 /* Precondition.swift */; }; + E2C63AE725AD3E9800F76AD7 /* XCTest+Precondition.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C63AE625AD3E9800F76AD7 /* XCTest+Precondition.swift */; }; E2CBC2F3259CD73700B92BA4 /* IGStoryButtonKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2CBC2E9259CD73700B92BA4 /* IGStoryButtonKit.framework */; }; E2CBC2F8259CD73700B92BA4 /* IGStoryButtonTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CBC2F7259CD73700B92BA4 /* IGStoryButtonTest.swift */; }; E2CBC2FA259CD73700B92BA4 /* IGStoryButtonKit.h in Headers */ = {isa = PBXBuildFile; fileRef = E2CBC2EC259CD73700B92BA4 /* IGStoryButtonKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -75,6 +77,8 @@ E27115E625A2E1FC00B6ACA6 /* StoryCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StoryCell.xib; sourceTree = ""; }; E27115F925A41E1300B6ACA6 /* Story.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Story.swift; sourceTree = ""; }; E27C03D425A1EEF700A1D1FC /* StatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusView.swift; sourceTree = ""; }; + E2C63ADF25AD3D6300F76AD7 /* Precondition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Precondition.swift; sourceTree = ""; }; + E2C63AE625AD3E9800F76AD7 /* XCTest+Precondition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "XCTest+Precondition.swift"; sourceTree = ""; }; E2CBC2E9259CD73700B92BA4 /* IGStoryButtonKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IGStoryButtonKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E2CBC2EC259CD73700B92BA4 /* IGStoryButtonKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IGStoryButtonKit.h; sourceTree = ""; }; E2CBC2ED259CD73700B92BA4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -120,6 +124,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + E2490E2E25AD4063000DA950 /* Extension */ = { + isa = PBXGroup; + children = ( + E2C63AE625AD3E9800F76AD7 /* XCTest+Precondition.swift */, + ); + path = Extension; + sourceTree = ""; + }; E271161B25A458D200B6ACA6 /* Model */ = { isa = PBXGroup; children = ( @@ -149,6 +161,15 @@ path = Application; sourceTree = ""; }; + E2C63ADE25AD3D1E00F76AD7 /* Helper */ = { + isa = PBXGroup; + children = ( + E2490E2E25AD4063000DA950 /* Extension */, + E2C63ADF25AD3D6300F76AD7 /* Precondition.swift */, + ); + path = Helper; + sourceTree = ""; + }; E2CBC2DF259CD73700B92BA4 = { isa = PBXGroup; children = ( @@ -187,6 +208,7 @@ E2CBC2F6259CD73700B92BA4 /* IGStoryButtonKitTests */ = { isa = PBXGroup; children = ( + E2C63ADE25AD3D1E00F76AD7 /* Helper */, E2CBC2F7259CD73700B92BA4 /* IGStoryButtonTest.swift */, E2599B9225AC5D050093E009 /* MockViewController.swift */, E2CBC2F9259CD73700B92BA4 /* Info.plist */, @@ -401,8 +423,10 @@ buildActionMask = 2147483647; files = ( E2CBC2F8259CD73700B92BA4 /* IGStoryButtonTest.swift in Sources */, + E2C63AE725AD3E9800F76AD7 /* XCTest+Precondition.swift in Sources */, E271163325A485C600B6ACA6 /* Extensions.swift in Sources */, E271162725A482D300B6ACA6 /* IGStoryButton.swift in Sources */, + E2C63AE025AD3D6300F76AD7 /* Precondition.swift in Sources */, E2599B9325AC5D050093E009 /* MockViewController.swift in Sources */, E271162D25A4859B00B6ACA6 /* ContentView.swift in Sources */, E271162A25A4859900B6ACA6 /* StatusView.swift in Sources */, diff --git a/IGStoryButtonKit/IGStoryButton.swift b/IGStoryButtonKit/IGStoryButton.swift index c3120be..6381d64 100644 --- a/IGStoryButtonKit/IGStoryButton.swift +++ b/IGStoryButtonKit/IGStoryButton.swift @@ -142,7 +142,7 @@ public protocol IGStoryButtonDelegate: class { override public func layoutSubviews() { super.layoutSubviews() - precondition(frame.width == frame.height, "The size of width and height are required to be equal") + validate(width: frame.width, height: frame.height) // arrange layout configureLayout() } @@ -164,6 +164,12 @@ public protocol IGStoryButtonDelegate: class { } } +public extension IGStoryButton { + func validate(width: CGFloat, height: CGFloat) { + precondition(width == height, "The size of width and height are required to be equal") + } +} + // TODO: implemented richer animation like instagram story... public extension IGStoryButton { /// execute circle animation diff --git a/IGStoryButtonKitTests/Helper/Extension/XCTest+Precondition.swift b/IGStoryButtonKitTests/Helper/Extension/XCTest+Precondition.swift new file mode 100644 index 0000000..31b9552 --- /dev/null +++ b/IGStoryButtonKitTests/Helper/Extension/XCTest+Precondition.swift @@ -0,0 +1,25 @@ +// +// XCTest+Precondition.swift +// IGStoryButtonKitTests +// +// Created by k_muta on 2021/01/12. +// + +import XCTest + +extension XCTestCase { + func expectPreconditionFailure(expectedMessage: String, block: () -> ()) { + let expect = expectation(description: "failing precondition") + preconditionClosure = { + (condition, message, file, line) in + if !condition { + expect.fulfill() + XCTAssertEqual(message, expectedMessage, "precondition message didn't match", file: file, line: line) + } + } + block() + waitForExpectations(timeout: 2.0, handler: nil) + preconditionClosure = defaultPreconditionClosure + } +} + diff --git a/IGStoryButtonKitTests/Helper/Precondition.swift b/IGStoryButtonKitTests/Helper/Precondition.swift new file mode 100644 index 0000000..882ad5e --- /dev/null +++ b/IGStoryButtonKitTests/Helper/Precondition.swift @@ -0,0 +1,15 @@ +// +// Precondition.swift +// IGStoryButtonKitTests +// +// Created by k_muta on 2021/01/12. +// + +import Foundation + +func precondition(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) { + preconditionClosure(condition(), message(), file, line) +} + +var preconditionClosure: (Bool, String, StaticString, UInt) -> () = defaultPreconditionClosure +let defaultPreconditionClosure = { Swift.precondition($0, $1, file: $2, line: $3) } diff --git a/IGStoryButtonKitTests/IGStoryButtonTest.swift b/IGStoryButtonKitTests/IGStoryButtonTest.swift index 5a9f0cf..7a255ae 100644 --- a/IGStoryButtonKitTests/IGStoryButtonTest.swift +++ b/IGStoryButtonKitTests/IGStoryButtonTest.swift @@ -18,6 +18,14 @@ final class IGStoryButtonTests: XCTestCase { XCTAssertEqual(storyButton.frame.height, 100) } + func testExpectPreconditionFailure() { + let frame = CGRect(x: 0, y: 0, width: 100, height: 80) + let storyButton = IGStoryButton(frame: frame, displayType: .none, colorType: .clear, image: UIImage()) + expectPreconditionFailure(expectedMessage: "The size of width and height are required to be equal") { + storyButton.validate(width: frame.width, height: frame.height) + } + } + func testDisplayTypeAndColorTypeIsValid() { let storyButton = IGStoryButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) let mockImage: UIImage? = .init() From 490b11d2b8c533b1f0bfe4d1f04bd1087d85742c Mon Sep 17 00:00:00 2001 From: muta Date: Tue, 12 Jan 2021 12:02:12 +0900 Subject: [PATCH 8/8] chore: create folder for mock --- IGStoryButtonKit.xcodeproj/project.pbxproj | 10 +++++++++- .../{ => Helper/Mock}/MockViewController.swift | 0 2 files changed, 9 insertions(+), 1 deletion(-) rename IGStoryButtonKitTests/{ => Helper/Mock}/MockViewController.swift (100%) diff --git a/IGStoryButtonKit.xcodeproj/project.pbxproj b/IGStoryButtonKit.xcodeproj/project.pbxproj index 51f51e2..028d1d9 100644 --- a/IGStoryButtonKit.xcodeproj/project.pbxproj +++ b/IGStoryButtonKit.xcodeproj/project.pbxproj @@ -132,6 +132,14 @@ path = Extension; sourceTree = ""; }; + E2490E3325AD4893000DA950 /* Mock */ = { + isa = PBXGroup; + children = ( + E2599B9225AC5D050093E009 /* MockViewController.swift */, + ); + path = Mock; + sourceTree = ""; + }; E271161B25A458D200B6ACA6 /* Model */ = { isa = PBXGroup; children = ( @@ -164,6 +172,7 @@ E2C63ADE25AD3D1E00F76AD7 /* Helper */ = { isa = PBXGroup; children = ( + E2490E3325AD4893000DA950 /* Mock */, E2490E2E25AD4063000DA950 /* Extension */, E2C63ADF25AD3D6300F76AD7 /* Precondition.swift */, ); @@ -210,7 +219,6 @@ children = ( E2C63ADE25AD3D1E00F76AD7 /* Helper */, E2CBC2F7259CD73700B92BA4 /* IGStoryButtonTest.swift */, - E2599B9225AC5D050093E009 /* MockViewController.swift */, E2CBC2F9259CD73700B92BA4 /* Info.plist */, ); path = IGStoryButtonKitTests; diff --git a/IGStoryButtonKitTests/MockViewController.swift b/IGStoryButtonKitTests/Helper/Mock/MockViewController.swift similarity index 100% rename from IGStoryButtonKitTests/MockViewController.swift rename to IGStoryButtonKitTests/Helper/Mock/MockViewController.swift