Extract start function for options

This commit is contained in:
Uku Taht
2016-03-07 17:58:52 +02:00
parent a59ce4f294
commit a4e84f7404
3 changed files with 12 additions and 10 deletions

View File

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