Sha256: 8761c1ee1196563c6e1ea55c43275370a812015518f6e077288bd0b829836024
Contents?: true
Size: 1010 Bytes
Versions: 188
Compression:
Stored size: 1010 Bytes
Contents
require 'minitest/autorun' require_relative 'atbash_cipher' class AtbashTest < Minitest::Test def test_encode_no assert_equal 'ml', Atbash.encode('no') end def test_encode_yes skip assert_equal 'bvh', Atbash.encode('yes') end def test_encode_OMG skip assert_equal 'lnt', Atbash.encode('OMG') end def test_encode_O_M_G skip assert_equal 'lnt', Atbash.encode('O M G') end def test_encode_long_word skip assert_equal 'nrmwy oldrm tob', Atbash.encode('mindblowingly') end def test_encode_numbers skip assert_equal('gvhgr mt123 gvhgr mt', Atbash.encode('Testing, 1 2 3, testing.')) end def test_encode_sentence skip assert_equal 'gifgs rhurx grlm', Atbash.encode('Truth is fiction.') end def test_encode_all_the_things skip plaintext = 'The quick brown fox jumps over the lazy dog.' cipher = 'gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt' assert_equal cipher, Atbash.encode(plaintext) end end
Version data entries
188 entries across 188 versions & 1 rubygems