mRs- / QuickSwiftCheck

Quick + Nimble + SwiftCheck

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QuickSwiftCheck

Quick + Nimble + SwiftCheck = QuickSwiftCheck.

Requirements

QuickSwiftCheck supports macOS 10.10+, iOS 9.0+, tvOS 9.0+ and Linux.

Usage

QuickSwiftCheck allows you to use Quick and Nimble together with SwiftCheck:

sc_it("integer addition is commutative") {
    forAll { (a: Int, b: Int) in
        expect(a + b).sc_to(equal(b + a))
    }
}

QuickSwiftCheck adds sc_ variants to it, fit, xit, to and toNot functions, so that the original functions remain not overloaded (because doing so causes type checking ambiguities). This means you can use it to create a regular test example and to to create a regular expectation:

it("this is a regular test example") {
    expect(...).to(...)
}
sc_it("this is a property-based test example") {
    forAll {
        expect(...).sc_to(...)
    }
}

Installation

Swift Package Manager

If you're using Swift Package Manager, add the following dependency to your Package.swift:

.package(url: "https://github.com/akashivskyy/QuickSwiftCheck", from: "{version}"),

CocoaPods

If you're using CocoaPods, add the following dependency to your Podfile:

pod 'QuickSwiftCheck', '~> {version}'

Roadmap

Version 3.x

These minor releases will keep QuickSwiftCheck up-to-date with latest versions of Quick, Nimble, SwiftCheck and Swift itself.

About

This project is made and maintained with ♡ by Adrian Kashivskyy.

License

The project is licensed under the MIT License.

About

Quick + Nimble + SwiftCheck

License:MIT License


Languages

Language:Swift 100.0%