From 838b1238cd17ba1e968ba00215c0a068092cf6fb Mon Sep 17 00:00:00 2001 From: Vittorio Monaco Date: Tue, 26 Apr 2016 21:31:07 +0200 Subject: [PATCH] Fixes tests not compiling on the OS X target and adds a line for the .travis.yml so that tests are always ran --- .travis.yml | 4 ++-- Tests/Tests.swift | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index af40f39..2309b3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,6 @@ before_install: - gem install xcpretty -N script: - set -o pipefail - - xcodebuild -project SnapKit.xcodeproj -scheme "SnapKit iOS" -sdk iphonesimulator - -destination "platform=iOS Simulator,name=iPhone 6" ONLY_ACTIVE_ARCH=NO test | xcpretty -c + - xcodebuild -project SnapKit.xcodeproj -scheme "SnapKit iOS" -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6" ONLY_ACTIVE_ARCH=NO test | xcpretty -c + - xcodebuild -project SnapKit.xcodeproj -scheme "SnapKit OSX" ONLY_ACTIVE_ARCH=YES test | xcpretty -c - pod lib lint --quick diff --git a/Tests/Tests.swift b/Tests/Tests.swift index 95a7dd0..8d96495 100644 --- a/Tests/Tests.swift +++ b/Tests/Tests.swift @@ -282,11 +282,11 @@ class SnapKitTests: XCTestCase { XCTAssertEqual(constraints[0].secondAttribute, NSLayoutAttribute.Top, "Should be top") XCTAssertEqual(constraints[1].secondAttribute, NSLayoutAttribute.Bottom, "Should be bottom") - XCTAssertEqual(constraints[0].firstItem as? UIView, view, "Should be added subview") - XCTAssertEqual(constraints[1].firstItem as? UIView, view, "Should be added subview") + XCTAssertEqual(constraints[0].firstItem as? View, view, "Should be added subview") + XCTAssertEqual(constraints[1].firstItem as? View, view, "Should be added subview") - XCTAssertEqual(constraints[0].secondItem as? UIView, container, "Should be containerView") - XCTAssertEqual(constraints[1].secondItem as? UIView, container, "Should be containerView") + XCTAssertEqual(constraints[0].secondItem as? View, container, "Should be containerView") + XCTAssertEqual(constraints[1].secondItem as? View, container, "Should be containerView") XCTAssertEqual(constraints[0].constant, 10, "Should be 10") XCTAssertEqual(constraints[1].constant, -10, "Should be 10")