Sha256: e234e66fa2d7badb908edb6c0c6a59c717b2635c137ae319977b0d61cb7095d2
Contents?: true
Size: 876 Bytes
Versions: 27
Compression:
Stored size: 876 Bytes
Contents
if !System.get_env("EXERCISM_TEST_EXAMPLES") do Code.load_file("two_fer.exs", __DIR__) end ExUnit.start() ExUnit.configure(exclude: :pending, trace: true) defmodule TwoFerTest do use ExUnit.Case test "no name given" do assert TwoFer.two_fer() == "One for you, one for me" end @tag :pending test "a name given" do assert TwoFer.two_fer("Gilberto Barros") == "One for Gilberto Barros, one for me" end @tag :pending test "when the parameter is a number" do assert_raise FunctionClauseError, fn -> TwoFer.two_fer(10) end end @tag :pending test "when the parameter is an atom" do assert_raise FunctionClauseError, fn -> TwoFer.two_fer(:bob) end end @tag :pending test "when the parameter is a charlist" do assert_raise FunctionClauseError, fn -> refute TwoFer.two_fer('Jon Snow') end end end
Version data entries
27 entries across 27 versions & 1 rubygems