add .formatter.exs + format

This commit is contained in:
Martino Visintin
2018-05-22 21:46:54 +01:00
parent 08c90ce0d8
commit b07df7c780
52 changed files with 332 additions and 264 deletions

View File

@@ -5,24 +5,24 @@ defmodule TrackerTest do
test "can start" do
Tracker.set_total(@sample_modules)
assert Tracker.summarize == %{total: 2, current: 0, visited_modules: []}
assert Tracker.summarize() == %{total: 2, current: 0, visited_modules: []}
end
test "can be notified of completed koans" do
Tracker.set_total(@sample_modules)
Tracker.completed(SampleKoan, :"Hi there")
assert Tracker.summarize == %{total: 2, current: 1, visited_modules: [SampleKoan]}
assert Tracker.summarize() == %{total: 2, current: 1, visited_modules: [SampleKoan]}
end
test "multiple comletions of the same koan count only once" do
Tracker.set_total(@sample_modules)
Tracker.completed(SampleKoan, :"Hi there")
Tracker.completed(SampleKoan, :"Hi there")
assert Tracker.summarize == %{total: 2, current: 1, visited_modules: [SampleKoan]}
assert Tracker.summarize() == %{total: 2, current: 1, visited_modules: [SampleKoan]}
end
test "knows when koans are not complete" do
Tracker.set_total(@sample_modules)
refute Tracker.complete?
refute Tracker.complete?()
end
end