Adds module to parse arguments passed to mediate
This commit is contained in:
18
test/options_test.exs
Normal file
18
test/options_test.exs
Normal 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
|
Reference in New Issue
Block a user