Last active
May 9, 2016 22:56
-
-
Save samjarman/a92ecc08e4d22161f15615d9e33d7466 to your computer and use it in GitHub Desktop.
A simple elixir function and its test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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