Merge pull request #228 from vittoriom/osx/fixTestsAndEnableTravis

Fixes tests not compiling on the OS X target and adds a line for the travis.yml so that tests are always ran
This commit is contained in:
Robert Payne 2016-04-30 20:50:12 +12:00
commit 1770df617b
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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")