Sha256: 4da9e574f2c404fb7a934aec59c2013c3a093aa3592c28bde13642f02e848256
Contents?: true
Size: 707 Bytes
Versions: 20
Compression:
Stored size: 707 Bytes
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__)) require 'test_helper' include EncryptionLab class TestEncryption < Test::Unit::TestCase def test_00_banner print "\nEncryptionLab" end # Caesar cypher def test_01_caesar assert_equal caesar("abcdefghijklmnopqrstuvwxyz"), "defghijklmnopqrstuvwxyzabc" assert_equal caesar("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), "DEFGHIJKLMNOPQRSTUVWXYZABC" assert_equal caesar("abcdefghijklmnopqrstuvwxyz", 13), "nopqrstuvwxyzabcdefghijklm" assert_equal caesar("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 13), "NOPQRSTUVWXYZABCDEFGHIJKLM" assert_equal caesar("Et tu, Brute?"), "Hw wx, Euxwh?" assert_equal caesar("Et tu, Brute?", 13), "Rg gh, Oehgr?" end end
Version data entries
20 entries across 20 versions & 1 rubygems