Remove assertions on errors

This commit is contained in:
Uku Taht
2016-03-17 16:47:15 +00:00
parent ddba726e38
commit 17210ebe56
3 changed files with 0 additions and 14 deletions

View File

@@ -39,10 +39,6 @@ defmodule BlankAssertions do
end end
end end
def assert_raise(exception, callback) do
ExUnit.Assertions.assert_raise exception, fn -> callback.call() end
end
def assert(value, opts) do def assert(value, opts) do
ExUnit.Assertions.assert(value, opts) ExUnit.Assertions.assert(value, opts)
end end

View File

@@ -21,10 +21,6 @@ defmodule Tuples do
assert Tuple.insert_at({:a, "hi"}, 1, :new_thing) == :__ assert Tuple.insert_at({:a, "hi"}, 1, :new_thing) == :__
end 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 koan "add things at the end" do
assert Tuple.append({"Huey", "Dewey"}, "Louie") == :__ assert Tuple.append({"Huey", "Dewey"}, "Louie") == :__
end end
@@ -33,10 +29,6 @@ defmodule Tuples do
assert Tuple.delete_at({:this, :is, :not, :awesome}, 2) == :__ assert Tuple.delete_at({:this, :is, :not, :awesome}, 2) == :__
end 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 koan "turn it into a list in case you need it" do
assert Tuple.to_list({:this, :can, :be, :a, :list}) == :__ assert Tuple.to_list({:this, :can, :be, :a, :list}) == :__
end end

View File

@@ -224,10 +224,8 @@ defmodule KoansHarnessTest do
"hi", "hi",
{:a, "bye"}, {:a, "bye"},
{:a, :new_thing, "hi"}, {:a, :new_thing, "hi"},
ArgumentError,
{"Huey", "Dewey", "Louie"}, {"Huey", "Dewey", "Louie"},
{:this, :is, :awesome}, {:this, :is, :awesome},
ArgumentError,
[:this, :can, :be, :a, :list] [:this, :can, :be, :a, :list]
] ]