quick/nimble
Use Nimble to express the expected outcomes of Swift
Swift Package Manager
Xcode
To install Nimble via Xcode's Swift Package Manager Integration: Select your project configuration, then the project tab, then the Package Dependencies tab. Click on the "plus" button at the bottom of the list, then follow the wizard to add Quick to your project. Specify https://github.com/Quick/Nimble.git as the url, and be sure to add Nimble as a dependency of your unit test target, not your app target.
Package.Swift
To use Nimble with Swift Package Manager to test your applications, add Nimble to your Package.Swift and link it with your test target:
// swift-tools-version:5.7
import PackageDescription
let package = Package(
name: "MyAwesomeLibrary",
products: [
// ...
],
dependencies: [
// ...
.package(url: "https://github.com/Quick/Nimble.git", from: "13.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "MyAwesomeLibrary",
dependencies: ...),
.testTarget(
name: "MyAwesomeLibraryTests",
dependencies: ["MyAwesomeLibrary", "Nimble"]),
]
)Please note that if you install Nimble using Swift Package Manager, then raiseException is not available.
CocoaPods
To use Nimble in CocoaPods to test your macOS, iOS, tvOS or watchOS applications, add Nimble to your podfile and add the ``use_frameworks!`` line to enable Swift support for CocoaPods.
platform :ios, '13.0'
source 'https://github.com/CocoaPods/Specs.git'
# Whatever pods you need for your app go here
target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do
use_frameworks!
pod 'Nimble'
endFinally run pod install.
Carthage
To use Nimble in Carthage to test your macOS, iOS, tvOS or watchOS applications, add Nimble to your Cartfile.private:
github "Quick/Nimble" ~> 13.2Then follow the rest of the Carthage Quick Start and link Nimble with your unit tests.
Git Submodules
To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow these 4 easy steps:
- Clone the Nimble repository
- Add Nimble.xcodeproj to the Xcode workspace for your project
- Link Nimble.framework to your test target
- Start writing expectations!
For more detailed instructions on each of these steps, read How to Install Quick. Ignore the steps involving adding Quick to your project in order to install just Nimble.
Privacy Statement
Nimble is a library that is only used for testing and should never be included in the binary submitted to App Store Connect.
Despite not being shipped to Apple, Nimble does not and will never collect any kind of analytics or tracking.
Package Metadata
Repository: quick/nimble
Default branch: main
README: README.md