github Quick/Nimble v3.2.0
Nimble v3.2.0

latest releases: v13.3.0, v13.2.1, v13.2.0...
8 years ago

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 NSNotifications to be posted to a notification center. Thanks to @bgerstle for this work! (#228)

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! (#250)

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! (#256)

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. On Linux, Nimble integrates with the swift-corelibs-xctest library.

Miscellaneous

  • be can now be used as an alias for the beIdenticalTo matcher. Thanks @jwfriese! (#241)
  • The compiler will now produce a warning if expect is used without being followed up by to, toNot, etc. Thanks @pcantrell! (#245)
  • NSData now has a special string representation to prevent failure messages from including excessively long data descriptions. Thanks @inket! (#263)

Don't miss a new Nimble release

NewReleases is sending notifications on new releases.