Swiftpack.co - Package - akashivskyy/QuickSwiftCheck

QuickSwiftCheck

Quick + Nimble + SwiftCheck = QuickSwiftCheck.

Requirements

QuickSwiftCheck is written in Swift 4.1 and supports macOS 10.10+, iOS 8.0+, tvOS 9.0+ and Linux.

Usage

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

sc_it("Int.hashValue should respect the axiom") {
    forAll { (x: Int, y: Int) in
        (x == y) ==> expect(x.hashValue).sc_to(equal(y.hashValue))
    }
}

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.git", from: "{version}"),

Carthage

If you're using Carthage, add the following dependency to your Cartfile:

github "akashivskyy/QuickSwiftCheck" ~> {version}

CocoaPods

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

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

Roadmap

Version 2.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. See LICENSE.md for more info.

Github

link
Stars: 6
Help us keep the lights on

Used By

Total: 0

Releases

2.1.0 - May 20, 2018

This release brings Xcode 9.3 and Swift 4.1 support to QuickSwiftCheck.

Note: The prebuilt framework targets Swift 4.1 and Xcode 9.3.

2.0.0 - Nov 15, 2017

This release brings Swift 4.0.2 and Swift Package Manager support to QuickSwiftCheck.

Note: The prebuilt framework targets Swift 4.0.2 and Xcode 9.1.

1.2.0 - Oct 1, 2017

This release is the same as 1.1.0 but fixes CocoaPods installation.

Note: The prebuilt framework targets Swift 3.2 and Xcode 9.0.

1.1.0 - Oct 1, 2017

This release brings Xcode 9.0 and Swift 3.2 support to QuickSwiftCheck.

Note: The prebuilt framework targets Swift 3.2 and Xcode 9.0.

1.0.0 - Jul 19, 2017

This is an initial release of QuickSwiftCheck.

Note: The prebuilt framework targets Swift 3.1 and Xcode 8.3.