Releases: lcoderre/Nimble
Releases · lcoderre/Nimble
v4.0.1
Nimble v3.2.0
=============
This release includes bug fixes, minor enhancements, and a couple of new matchers. This release targets Xcode 7.2.x and Swift 2.1. It also generally works with Xcode 7.3 betas and Swift 2.2 (thanks @NachoSoto!), although many deprecation warnings are emitted.
Additionally, initial support is available for using Nimble with the Swift Package Manager on both OS X and Linux. This should be considered a technical preview as SwiftPM and the do not yet have any stable releases.
New Matcher: postNotifications
==============================
This matcher allows testing that an expression causes one or more `NSNotification`s to be posted to a notification center. Thanks to @bgerstle for this work!
```swift
expect {
NSNotificationCenter.defaultCenter().postNotification(myNotification)
}.to(postNotifications(equal([myNotification]))
```
New Matcher: beVoid
===================
This matcher allows testing whether an optional value of type `Void?` contains a value, or is `nil`. Thanks to @inamiy for this!
```swift
expect(() as ()?).to(beVoid())
```
Asynchronous Expectation Defaults
=================================
It is now possible to modify the global default values for the timeout and poll interval used by `toEventually`. Thanks @mjbeauregard!
```swift
AsyncDefaults.Timeout = 2
AsyncDefaults.PollInterval = 0.05
```
Swift Package Manager
=====================
It is now possible to reference Nimble as a package dependency in a `Package.swift` file for use with the Swift Package Manager. As SwiftPM is not yet stable, this integration should be considered an early preview and may break.
Linux Support
=============
Complementing SwiftPM support, Nimble can now be used on Linux, with the caveat that not all behaviors and matchers are supported. Features that rely on the Objective-C runtime are disabled in this environment.
Miscellaneous
=============
* `be` can now be used as an alias for the `beIdenticalTo` matcher. Thanks @jwfriese!
* The compiler will now produce a warning if `expect` is used without being followed up by `to`, `toNot`, etc. Thanks @pcantrell!
* `NSData` now has a special string representation to prevent failure messages from including excessively long data descriptions. Thanks @inket!