Latest 0.2.0
Homepage https://github.com/crossroadlabs/XCTest3
License Apache 2.0
Platforms ios 8.0, osx 10.9, tvos 9.0, requires ARC
Dependencies Boilerplate
Frameworks XCTest
Authors

XCTest3

🐧 linux: ready
![🐤 3.0: ready](https://img.shields.io/badge/🐤 3.0-ready-reallyed.svg)
Build Status
Carthage compatible
![Platform OS X | iOS | tvOS | watchOS | Linux](https://img.shields.io/badge/platform-OS X | iOS | tvOS | watchOS | Linux-orange.svg)
![Swift version](https://img.shields.io/badge/Swift-2.2 | 3.0-blue.svg)
![GitHub license](https://img.shields.io/badge/license-Apache 2.0-lightgrey.svg)
GitHub release

Swift XCTest Shims that mimic Swift 3.0 APIs. For thous who wants to maintain Swift multiple versions compatibility

Goals

XCTest3 library was mainly introduced to fulfill the needs of Swift Express – web application server side framework for Swift. Now it’s a part of Crossroad Labs Foundation.

Still we hope it will be useful for everybody else.

Bother less with #if swift(>=3.0) ;)

Getting started

Installation

Package Manager

Add the following dependency to your Package.swift:

.Package(url: "https://github.com/crossroadlabs/XCTest3.git", majorVersion: 0)

Run swift build and build your app. Package manager is supported on OS X, but it’s still recommended to be used on Linux only.

Carthage

Add the following to your Cartfile:

github "crossroadlabs/XCTest3"

Run carthage update and follow the steps as described in Carthage’s README.

CocoaPods

Add the following to your Podfile:

pod 'XCTest3'

Make sure that you are integrating your dependencies using frameworks: add use_frameworks! to your Podfile. Then run pod install.

Examples

Introduction:

OK, XCTest has changed as well since introduction of Swift 3.0. APIs are different and you either have to use #if swift(>=3.0) excessively or use XCTest3. With XCTest3 you just use Swift 3.0 APIs. You can read more about it in Boilerplate and Foundation3.

Here is an example on how to use XCTest with Swift 3.0 APIs

let expectation = self.expectation(withDescription: "test expectation")
        expectation.fulfill()

self.waitForExpectations(withTimeout: 0)

Absent API?

OK, guys. We wrap XCTest APIs as we encounter them. Want more? We are glad to accept contributions. Let’s make Swift 3.0 compatibility layer together.

Keep your tests clean ;)

Contributing

To get started, sign the Contributor License Agreement.

Crossroad Labs by Crossroad Labs

Latest podspec

{
    "name": "XCTest3",
    "version": "0.2.0",
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    },
    "summary": "Swift XCTest Shims that mimic Swift 3.0 API. For thous who wants to maintain Swift multiple versions compatibility",
    "homepage": "https://github.com/crossroadlabs/XCTest3",
    "social_media_url": "https://github.com/crossroadlabs/XCTest3",
    "authors": {
        "Daniel Leping": "[email protected]"
    },
    "source": {
        "git": "https://github.com/crossroadlabs/XCTest3.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "tvos": "9.0"
    },
    "source_files": "XCTest3/*.swift",
    "dependencies": {
        "Boilerplate": [
            "~> 0.2"
        ]
    },
    "requires_arc": true,
    "frameworks": "XCTest",
    "ios": {
        "pod_target_xcconfig": {
            "ENABLE_BITCODE": "NO"
        }
    }
}

Pin It on Pinterest

Share This