Files
elixir-koans/test/options_test.exs
2016-03-06 14:54:12 +00:00

19 lines
445 B
Elixir

defmodule OptionTest do
use ExUnit.Case, async: true
test "has default options" do
options = Options.parse([])
refute Map.fetch!(options, :clear_screen)
end
test "override clearing of screen" do
options = Options.parse(["--clear-screen"])
assert Map.fetch!(options, :clear_screen)
end
test "ignores unknown options" do
options = Options.parse(["--foo"])
refute Map.fetch!(options, :clear_screen)
end
end