Sha256: ac81c1cf4954c95964a26961f50166d2edf2ba9cb5d11da5bef96e65c62e5072
Contents?: true
Size: 855 Bytes
Versions: 263
Compression:
Stored size: 855 Bytes
Contents
if !System.get_env("EXERCISM_TEST_EXAMPLES") do Code.load_file("luhn.exs", __DIR__) end ExUnit.start ExUnit.configure exclude: :pending, trace: true defmodule LuhnTest do use ExUnit.Case test "checksum" do assert Luhn.checksum("4913") == 22 end @tag :pending test "checksum again" do assert Luhn.checksum("201773") == 21 end @tag :pending test "invalid number" do assert Luhn.valid?("738") == false end @tag :pending test "valid number" do assert Luhn.valid?("8739567") == true end @tag :pending test "create valid number" do assert Luhn.create("123") == "1230" end @tag :pending test "create other valid number" do assert Luhn.create("873956") == "8739567" end @tag :pending test "create yet another valid number" do assert Luhn.create("837263756") == "8372637564" end end
Version data entries
263 entries across 263 versions & 1 rubygems