This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // FadeScrollView.swift | |
| // | |
| // Created by Luís Machado on 23/06/2017. | |
| // Copyright © 2017 Luis Machado. All rights reserved. | |
| // | |
| import UIKit | |
| class FadeScrollView: UIScrollView, UIScrollViewDelegate { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target 'FizzBuzzTests' do | |
| inherit! :search_paths | |
| pod 'Nimble' | |
| pod 'Quick' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import XCTest | |
| @testable import FizzBuzz | |
| class ViewControllerUnitTests: XCTestCase { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Quick | |
| import Nimble | |
| @testable import FizzBuzz | |
| class ViewControllerUnitTests: QuickSpec { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Quick | |
| import Nimble | |
| @testable import FizzBuzz | |
| class ViewControllerUnitTestsNimble: QuickSpec { | |
| var viewController: ViewController! | |
| override func spec() { | |
| describe("View Controller Tests") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override func setUp() { | |
| super.setUp() | |
| let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main) | |
| // swiftlint:disable:next force_cast | |
| viewController = storyboard.instantiateViewController(withIdentifier: "ViewController") as! ViewController | |
| UIApplication.shared.keyWindow!.rootViewController = viewController | |
| _ = viewController.view | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beforeEach { | |
| let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main) | |
| self.viewController = storyboard.instantiateViewController(withIdentifier: "ViewController") as! ViewController | |
| UIApplication.shared.keyWindow!.rootViewController = self.viewController | |
| _ = self.viewController.view | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func testHasAGame() { | |
| XCTAssertNotNil(viewController.game) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it("testHasAGame") { | |
| expect(self.viewController.game).toNot(beNil()) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| XCTAssertEqual(newScore, 5) | |
| expect(newScore).to(equal(5)) | |
| XCTAssertEqual(result, false) | |
| expect(result).to(beFalse()) | |
| XCTAssertNotNil(response.score) | |
| expect(response.score).toNot(beNil()) |
OlderNewer