Nimble v9 has been released! 🎉
The new major version requires Swift 5.2 / Xcode 11.4 at least, which also supports Swift 5.3 / Xcode 12 as well.
Changes since v9.0.0-rc.3
BREAKING CHANGES
beCloseTo
matcher generic to fix a build error when used with allPass
matcher on Swift 5.3 #832
Improvements
BREAKING CHANGES
- Bump Swift requirement to 5.2 (Xcode 11.4) #689, #692, #701, #728
- Make
throwAssertion
andthrowError
matchers generic and usable with non-void closures #698 - Replaced TimeInterval with DispatchTimeInterval #718 (Thanks @wongzigii)
- Deprecate Matcher-to-Predicate migration-path features as planned in the Deprecation Roadmap #745, #746
- Add label to the second associated value of
ExpectationMessage.expectedCustomValueTo
for readability and understandability #751 - Make
raiseException
generic and usable with non-void closures #752 - Replace NMBMatcher return types with NMBPredicate #757
- Move most of Objective-C matchers from NMBObjCMatcher to NMBPredicate #761
- Convert Objective-C raiseException matcher to NMBPredicate #762
- Convert Objective-C beCloseTo matcher to NMBPredicate #764
- Convert Objective-C matchers' return types from
id<NMBMatcher>
toNMBPredicate
#765 - Deprecate NMBObjCMatcher which is not used inside Nimble anymore #767
- Make
postNotifications
generic and usable with non-void closures #819 - Bump minimum iOS version to 9.0 #825
- [API BREAKING] Modify
expect
overloads to fix Swift 5.3 incompatibility #824 - Make
beCloseTo
matcher generic to fix a build error when used withallPass
matcher on Swift 5.3 #832
Additions
- Add
elementsEqual(_:by:)
matcher using a predicate closure #695 - Implement assertion chaining #742, #750 (Thanks @mockersf)
- Add
beginWith(prefix:)
matcher for sequence prefixes #719 (Thanks @Skoti) - Support passing NSExceptionName to raiseException matcher #776
- Add postDistributedNotifications matcher for testing DistributedNotificationCenter #786 (Thanks @fabianmuecke)
- Rename
postNotifications(_:fromNotificationCenter:)
topostNotifications(_:from:)
#788
Improvements
- Update CwlPreconditionTesting to 2.0.0 #681, #706
- [gardening] Move operators into types where possible #699
- [CI] Parallel platform testing #700
- Fix a swiftlint violation #726 (Thanks @chunkyguy)
- Enable module stability #732
- [CI] Use norio-nomura/action-swiftlint for running SwiftLint #735
- [CI] Test the latest Swift Development Snapshot #738
- Add default message to Predicate's convenience factory methods #743
- Simplify RaisesExceptionTest #748
- Enable parallel testing in Xcode #749
- Add
-Xlinker -no_application_extension
toOTHER_LDFLAGS
at project level #759 - [gardening] Use guard where appropriate #763
- Simplify generic parameters #768
- Refactor message creation for errors and exceptions #769
- Reduce Foundation import #770
- Tweak CI #771
- Remove now-unnecessary compiler version check #772
- Unify some
#if canImport(Darwin)
conditional compilations #773 bundle update --bundler
&&bundle update
#774- [Stringers] Remove Linux-related workaround in NSNumber.testDescription #777
- Utilize
as NSString
bridging on Linux as well #778 - Utilize
as NSArray
bridging on Linux as well #779 - Utilize
as NSDictionary
bridging on Linux as well #780 - Reduce
#if canImport(Darwin)
usages in tests #781 - Remove SUPPORT_IMPLICIT_BRIDGING_CONVERSION conditional compilation #782
- Use
as
bridging for NSNumber #783 - Remove unused
ExpectationMessage.sampleMessage
#654 - Refactor beEmpty matcher and add tests #785
- Refactor postNotifications matchers #787
- Create dependabot.yml #804
- Bump cocoapods from 1.9.2 to 1.9.3 #805
- Set ENABLE_TESTING_SEARCH_PATHS to YES #803
- Test building for tvOS with Xcode-SwiftPM integration #818
- Add DSL tests for
expect
variants #823 - Support ARM based Macs (Apple Silicon) #827 (Thanks @mRs-)
- Upgrade Project Format to Xcode 11.4-compatible #828
Bugfixes
- Fix elementsEqual matcher constraint to match with the Swift standard library equivalent #693
- Stop using method swizzling for registering CurrentTestCaseTracker to XCTestObservationCenter #741
- [tvOS] Remove CwlCatchException.h from public headers #760
- [tvOS] Remove CwlMachBadInstructionHandler.h from public headers #766
- Disambiguate
postNotifications
overloads #794 - Switch back to use
+[NSObject load]
for registering CurrentTestCaseTracker #815
Docs
- Unpin the cocoapods instructions from Nimble 6.0.0 in the README #717 (Thanks @intiocean)
- Fix README.md code example on Notifications #722 (Thanks @yanamura)
- Fix indent in ISSUE_TEMPLATE and PULL_REQUEST_TEMPLATE #744
- Reflect TimeInterval-to-DispatchTimeInterval changes to README #754
- Update README to align with Matcher deprecation #758