Mockingbird v0.12.0 Release Notes

Release Date: 2020-05-07 // over 1 year ago
  • Targets

    • Xcode 11.4 / Swift 5.2
    • 🍎 iOS 8.0+, macOS 10.14+, tvOS 9.0+

    Migrating from 0.11

    • 🀑 Mocking class constrained protocols without designated initializers now uses protocol mocking instead of class mocking

      protocol MyProtocol: AnyObject {}// Oldmock(MyProtocol.self).initialize()// Newmock(MyProtocol.self)

    • 🚚 The convenience non-parameterized closure stubbing operator has been removed; convert implicit argument closure stubs to explicitly ignore arguments

      // Oldgiven(myMock.doSomething(with: any())) ~> { print("Ignoring arguments") }// Newgiven(myMock.doSomething(with: any())) ~> { _ in print("Ignoring arguments") }

    πŸ†• New Features

    ✨ Enhancements

    • ♻️ Refactor import and compilation directive parsing to use SwiftSyntax, resulting in faster code generation (#92)
      Andrew Chang
    • βœ… Uniquify default generated file names when using the installer by prefixing the test target name (#100)
      Andrew Chang

    πŸ› Bug Fixes

    • πŸ›  Fix compatibility with Swift 5.2 (#91)
      Andrew Chang
    • πŸ›  Fix stubbing methods without parameters by removing the non-parameterized closure stubbing operator (#86)
      Andrew Chang | seven332
    • πŸ›  Fix generating convenience initializers for class constrained protocols without a declared designated initializer
      Andrew Chang
    • πŸ›  Fix handling bash-style variables in build settings, e.g. ${TARGET_NAME} (#83)
      Andrew Chang
    • πŸ›  Fix type inference for string literals and initialized types assigned to properties in class mocks (#108)
      Andrew Chang | Ryan Meisters
    • πŸ›  Fix mocking classes with designated and synthesized initializers, e.g. from Decodable (#93)
      Andrew Chang | Tristan Diependael
    • πŸ›  Fix synchronization of collection types in CLI and framework (#106)
      Andrew Chang
    • πŸ›  Fix uninstaller not removing .generated.swift source files added by the installer (#100)
      Andrew Chang