Use bare double underscores instead of atoms

This commit is contained in:
Uku Taht
2016-04-19 13:35:20 +01:00
parent 45619f6bdb
commit ea2bb8f9bf
14 changed files with 141 additions and 139 deletions

View File

@@ -3,7 +3,7 @@ defmodule Agents do
koan "Agents maintain state, so you can ask them about it" do
Agent.start_link(fn() -> "Hi there" end, name: __MODULE__)
assert Agent.get(__MODULE__, &(&1)) == :__
assert Agent.get(__MODULE__, &(&1)) == __
end
koan "Update to update the state" do
@@ -12,7 +12,7 @@ defmodule Agents do
Agent.update(__MODULE__, fn(old) ->
String.upcase(old)
end)
assert Agent.get(__MODULE__, &(&1)) == :__
assert Agent.get(__MODULE__, &(&1)) == __
end
koan "Use get_and_update when you need read and change a value in one go" do
@@ -22,8 +22,8 @@ defmodule Agents do
{old, ["Bread" | old]}
end)
assert old_list == :__
assert Agent.get(__MODULE__, &(&1)) == :__
assert old_list == __
assert Agent.get(__MODULE__, &(&1)) == __
end
koan "Somebody has to switch off the light at the end of the day" do
@@ -31,6 +31,6 @@ defmodule Agents do
result = Agent.stop(__MODULE__)
assert result == :__
assert result == __
end
end