From a Ruby/RSpec background, it may seem odd that mocking is discouraged in most cases in Elixir. In this case we're going to talk about why that is, and do some live coding on examples.

We'll cover

  • The existence of mocking libraries
  • Stubbing dependencies
  • Getting "Mock" behavior without a library
    • Setting up return values
    • Verifying parameters
    • Using built-in message passing
download code samples