Skip to content

Instantly share code, notes, and snippets.

@samjarman
Last active May 9, 2016 22:56
Show Gist options
  • Save samjarman/a92ecc08e4d22161f15615d9e33d7466 to your computer and use it in GitHub Desktop.
Save samjarman/a92ecc08e4d22161f15615d9e33d7466 to your computer and use it in GitHub Desktop.
A simple elixir function and its test
defmodule Misc do
def multiply(x, y) do
x * y
end
end
defmodule MiscTest do
use ExUnit.Case
doctest Misc
test "multiplying two numbers returns the product" do
assert Misc.multiply(2, 3) == 6
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment