Sha256: 3e032c83368a7feaec4e4b28dfcfa93cd04435361a7146286b6c3867107b332e
Contents?: true
Size: 1.01 KB
Versions: 326
Compression:
Stored size: 1.01 KB
Contents
if !System.get_env("EXERCISM_TEST_EXAMPLES") do Code.load_file("crypto_square.exs", __DIR__) end ExUnit.start ExUnit.configure exclude: :pending, trace: true defmodule CryptoSquareTest do use ExUnit.Case # @tag :pending test "empty string" do assert CryptoSquare.encode("") == "" end @tag :pending test "perfect square" do assert CryptoSquare.encode("abcd") == "ac bd" end @tag :pending test "uppercase string" do assert CryptoSquare.encode("ABCD") == "ac bd" end @tag :pending test "small imperfect square" do assert CryptoSquare.encode("This is easy") == "tis hsy ie sa" end @tag :pending test "punctuation and numbers" do assert CryptoSquare.encode("1, 2, 3, Go! Go, for God's sake!") == "1gga 2ook 3fde gos ors" end @tag :pending test "long string" do msg = "If man was meant to stay on the ground, god would have given us roots." cipher = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau" assert CryptoSquare.encode(msg) == cipher end end
Version data entries
326 entries across 326 versions & 1 rubygems