double v0.7.0 Release Notes

Release Date: 2019-04-22 // about 5 years ago
  • 🚀 This release adds the new stub syntax which is a great improvement over the old double/allow syntax. stub combines both into one function now:

    dbl = ModuleOrBehavior
    |> stub(:function_name, fn(x) -> x end)
    |> stub(:another_function, fn(x) -> x end)
    assert_receive({ModuleOrBehavior, :function_name, ["hello"]})

    You'll notice that the message now contains the module or behavior atom that the stub is built against. This prevents conflicts w/ function names between different modules and is another improvement that the stub syntax provides.

    🗄 The old double/allow syntax is no longer documented, but isn't marked as deprecated yet. We may consider that in the future, or maybe even dropping support for it in version 1.0.

    📄 For more details on the new syntax, please read the docs!

Previous changes from v0.6.6

  • 🚀 This release includes fixes to prevent conflicts with auto imported functions from Kernel. Thanks to @JonRowe for the contribution!