Skip to content

Instantly share code, notes, and snippets.

@bettio
Created March 7, 2020 22:48
Show Gist options
  • Save bettio/83cea97e48a722353cc4eafea30e8815 to your computer and use it in GitHub Desktop.
Save bettio/83cea97e48a722353cc4eafea30e8815 to your computer and use it in GitHub Desktop.
Elixir morse encoder example - step 5
defmodule EncoderTest do
use ExUnit.Case
alias MorseEncoder.Encoder
test "encode hello world" do
assert Encoder.morse_encode('HELLO') == '.... . .-.. .-.. --- '
end
end
- @moduledoc """
- Documentation for MorseEncoder.
- """
-
- @doc """
- Hello world.
-
- ## Examples
-
- iex> MorseEncoder.hello()
- :world
-
- """
- def hello do
- :world
- end
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment