Sha256: b8a4217254536962161d8f1c85c1eb093ad2e7127723ee08fd0fcacbfc72a9b0
Contents?: true
Size: 1.03 KB
Versions: 151
Compression:
Stored size: 1.03 KB
Contents
#!/usr/bin/env ruby gem 'minitest', '>= 5.0.0' 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
151 entries across 151 versions & 1 rubygems