Sha256: e05b3c0c33903177797f0d1e25480067792ac07bb7412dbc5be40e4c0ce4d6a3
Contents?: true
Size: 1.07 KB
Versions: 12
Compression:
Stored size: 1.07 KB
Contents
#!/usr/bin/env ruby gem 'minitest', '>= 5.0.0' require 'minitest/autorun' require_relative 'atbash_cipher' # rubocop:disable Style/MethodName 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
12 entries across 12 versions & 1 rubygems