Remove assertions on errors
This commit is contained in:
@@ -39,10 +39,6 @@ defmodule BlankAssertions do
|
||||
end
|
||||
end
|
||||
|
||||
def assert_raise(exception, callback) do
|
||||
ExUnit.Assertions.assert_raise exception, fn -> callback.call() end
|
||||
end
|
||||
|
||||
def assert(value, opts) do
|
||||
ExUnit.Assertions.assert(value, opts)
|
||||
end
|
||||
|
||||
@@ -21,10 +21,6 @@ defmodule Tuples do
|
||||
assert Tuple.insert_at({:a, "hi"}, 1, :new_thing) == :__
|
||||
end
|
||||
|
||||
koan "...avoid falling of the edge" do
|
||||
assert_raise :__, fn -> Tuple.insert_at({:a, "hi"}, 12, :new_thing) end
|
||||
end
|
||||
|
||||
koan "add things at the end" do
|
||||
assert Tuple.append({"Huey", "Dewey"}, "Louie") == :__
|
||||
end
|
||||
@@ -33,10 +29,6 @@ defmodule Tuples do
|
||||
assert Tuple.delete_at({:this, :is, :not, :awesome}, 2) == :__
|
||||
end
|
||||
|
||||
koan "you can't delete what you don't have" do
|
||||
assert_raise :__, fn -> Tuple.delete_at({:a, "hi"}, 12) end
|
||||
end
|
||||
|
||||
koan "turn it into a list in case you need it" do
|
||||
assert Tuple.to_list({:this, :can, :be, :a, :list}) == :__
|
||||
end
|
||||
|
||||
@@ -224,10 +224,8 @@ defmodule KoansHarnessTest do
|
||||
"hi",
|
||||
{:a, "bye"},
|
||||
{:a, :new_thing, "hi"},
|
||||
ArgumentError,
|
||||
{"Huey", "Dewey", "Louie"},
|
||||
{:this, :is, :awesome},
|
||||
ArgumentError,
|
||||
[:this, :can, :be, :a, :list]
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user