Adds module to parse arguments passed to mediate

This commit is contained in:
Felipe Sere
2016-03-06 14:54:12 +00:00
parent 1b4948f7ef
commit 4281c63ab1
2 changed files with 34 additions and 0 deletions

18
test/options_test.exs Normal file
View File

@@ -0,0 +1,18 @@
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