Incorporate feedback about usued elements and typos

This commit is contained in:
Felipe Sere
2016-04-25 22:40:00 +01:00
parent ab72b0e908
commit 1357235f8a
3 changed files with 2 additions and 19 deletions

View File

@@ -2,21 +2,6 @@ defmodule Mix.Tasks.Meditate do
use Mix.Task
alias Options
@modules [
Equalities,
Strings,
Tuples,
Lists,
Maps,
Structs,
PatternMatching,
Functions,
Enums,
Processes,
Tasks,
Agents,
]
def run(args) do
Application.ensure_all_started(:elixir_koans)
Code.compiler_options(ignore_module_conflict: true)

View File

@@ -9,7 +9,7 @@ defmodule Tracker do
def get do
Agent.get(__MODULE__, &(&1))
|> summirize
|> summarize
end
def completed(koan) do
@@ -18,7 +18,7 @@ defmodule Tracker do
end)
end
def summirize({total, completed}) do
def summarize({total, completed}) do
%{total: total, current: MapSet.size(completed)}
end
end

View File

@@ -18,8 +18,6 @@ defmodule TrackerTest do
Tracker.start(@sample_modules)
Tracker.completed(:"Hi there")
Tracker.completed(:"Hi there")
Tracker.completed(:"Hi there")
Tracker.completed(:"Hi there")
assert Tracker.get == %{total: 2, current: 1}
end
end