Swiftpack.co - Package - Quick/Quick

Build Status CocoaPods Carthage Compatible Platforms Reviewed by Hound

Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by RSpec, Specta, and Ginkgo.

// Swift

import Quick
import Nimble

class TableOfContentsSpec: QuickSpec {
  override func spec() {
    describe("the 'Documentation' directory") {
      it("has everything you need to get started") {
        let sections = Directory("Documentation").sections
        expect(sections).to(contain("Organized Tests with Quick Examples and Example Groups"))
        expect(sections).to(contain("Installing Quick"))
      }

      context("if it doesn't have what you're looking for") {
        it("needs to be updated") {
          let you = You(awesome: true)
          expect{you.submittedAnIssue}.toEventually(beTruthy())
        }
      }
    }
  }
}

Nimble

Quick comes together with Nimble — a matcher framework for your tests. You can learn why XCTAssert() statements make your expectations unclear and how to fix that using Nimble assertions here.

Swift Version

Certain versions of Quick and Nimble only support certain versions of Swift. Depending on which version of Swift your project uses, you should use specific versions of Quick and Nimble. Use the table below to determine which versions of Quick and Nimble are compatible with your project.

|Swift version |Quick version |Nimble version | |:--------------------|:---------------|:--------------| |Swift 3 |v1.0.0 or later |v5.0.0 or later| |Swift 2.2 / Swift 2.3|v0.9.3 |v4.1.0 |

Documentation

All documentation can be found in the Documentation folder, including detailed installation instructions for CocoaPods, Carthage, Git submodules, and more. For example, you can install Quick and Nimble using CocoaPods by adding the following to your Podfile:

# Podfile

use_frameworks!

target "MyApp" do
  # Normal libraries

  abstract_target 'Tests' do
    inherit! :search_paths
    target "MyAppTests"
    target "MyAppUITests"

    pod 'Quick'
    pod 'Nimble'
  end
end

Projects using Quick

Over ten-thousand apps use either Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them.

Does your organization or project use Quick and Nimble? If yes, please add your project to the list.

Who uses Quick

Similar to projects using Quick, it would be nice to hear why people use Quick and Nimble. Are there features you love? Are there features that are just okay? Are there some features we have that no one uses?

Have something positive to say about Quick (or Nimble)? If yes, provide a testimonial here.

License

Apache 2.0 license. See the LICENSE file for details.

Github

link
Stars: 7785
Help us keep the lights on

Dependencies

Used By

Total:

Releases

v1.3.2 - Sep 21, 2018

Bugfixes

  • Xcode 10: Adjust Build Phases order #817, #819 (Thanks @ikesyo)

v1.3.1 - Jul 12, 2018

Changes

  • Update Nimble to 7.1.3 #807 #808 (Thanks @ikesyo)

Bugfixes

  • Quick now works with Xcode 10's parallel testing feature #716 #806 (Thanks @haitaoli)
  • Fix CocoaPods integration issue regarding APPLICATION_EXTENSION_API_ONLY build setting #791 (Thanks @ikesyo)
  • Fix unrecognized selector crash on static linking #792 #803 (Thanks @ikesyo)

v1.3.0 - Apr 20, 2018

This release fully supports Xcode 9.3 (both Swift 3.3 and Swift 4.1) and still works with Xcode 8.3 + Swift 3.1! :tada:

New Features

  • Expose current spec for XCTest expectations #645 (Thanks @pcantrell)
  • Support Xcode 9.3 / Swift 4.1 #761 #765 #778 (Thanks @ikesyo)

Changes

  • Improve the interoperability with CocoaPods 1.5 Swift Static Libraries support #781 (Thanks @davidahouse)

Documentation Changes

  • Add Korean translation for Documentation #752 (Thanks @kyeongwan)
  • make Swift snippets for QuickConfiguration compile #754 (Thanks @michaelom)
  • Minor documentation fixes #762 (Thanks @freak4pc)

Bugfixes

  • Fix XCTest override error on SPM/Swift4 #755 (Thanks @sunshinejr)

v1.2.0 - Sep 28, 2017

This release fully supports Xcode 9 (both Swift 3.2 and Swift 4) and still works with Xcode 8.3 + Swift 3.1! :tada:

New Features

  • Introduce Behavior<Context> #701 (Thanks @mosamer)
  • Support Xcode 9 / Swift 4 #711, #721, #730, #735 (Thanks @ikesyo, @sharplet)

Changes

  • Performance improvment for large test suites #697 (Thanks @dbarden)
  • Better conformance to SwiftLint (Thanks @ecylo, @ikesyo, @nasakinmaxim, @wongzigii)

Documentation Changes

  • Fix japanese document typo #738 (Thanks @AcaiBowl)

Bugfixes

  • SwiftLint will be executed only on builds for testing #694 (Thanks @nerd0geek1)
  • Fix SwiftPM integration with generated Xcode projects #708 (Thanks @ikesyo)
  • Fix SPM integration #746 (Thanks @sunshinejr)

v1.1.0 - Feb 9, 2017

This release works with Xcode 8.2 + Swift 3.

New Features

  • Adds `fitBehavesLike to allow focusing of specific instantiations of shared examples (Thanks @wongzigii)
  • Add SwiftPM support on macOS (Thanks @ikesyo)
  • Add Documentation about Shared Examples in Portuguese (Thanks @pedrovereza)

Changes

  • SharedExampleContext is now [String: Any] instead of NSDictionary (Thanks @devdrey)
  • Better conformance to SwiftLint (Thanks @ikesyo, @wongzigii)

Bugfixes

  • Quick no longer prints warnings if SwiftLint is not installed (Thanks @wongzigii)
  • Fix bug where Quick didn't work with test bundles with non-c99 valid identifiers (Thanks @MP0w)