Refactor Tracker get/0 and summarize/0

This commit is contained in:
Jay Hayes
2016-04-26 18:16:17 -05:00
parent 93c41d6ced
commit 814d3db995
3 changed files with 7 additions and 7 deletions

View File

@@ -5,19 +5,19 @@ defmodule TrackerTest do
test "can start" do
Tracker.start(@sample_modules)
assert Tracker.get == %{total: 2, current: 0}
assert Tracker.summarize == %{total: 2, current: 0}
end
test "can be notified of completed koans" do
Tracker.start(@sample_modules)
Tracker.completed(:"Hi there")
assert Tracker.get == %{total: 2, current: 1}
assert Tracker.summarize == %{total: 2, current: 1}
end
test "multiple comletions of the same koan count only once" do
Tracker.start(@sample_modules)
Tracker.completed(:"Hi there")
Tracker.completed(:"Hi there")
assert Tracker.get == %{total: 2, current: 1}
assert Tracker.summarize == %{total: 2, current: 1}
end
end