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

Version Path
rubylabs-0.9.8 test/encryption_test.rb
rubylabs-0.9.7 test/encryption_test.rb
rubylabs-0.9.6 test/encryption_test.rb
rubylabs-0.9.5 test/encryption_test.rb
rubylabs-0.9.4 test/encryption_test.rb
rubylabs-0.9.3 test/encryption_test.rb
rubylabs-0.9.2 test/encryption_test.rb
rubylabs-0.9.1 test/encryption_test.rb
rubylabs-0.9.0 test/encryption_test.rb
rubylabs-0.8.3 test/encryption_test.rb
rubylabs-0.8.2 test/encryption_test.rb
rubylabs-0.8.1 test/encryption_test.rb
rubylabs-0.8.0 test/encryption_test.rb
rubylabs-0.7.5 test/encryption_test.rb
rubylabs-0.7.4 test/encryption_test.rb
rubylabs-0.7.3 test/encryption_test.rb
rubylabs-0.7.2 test/encryption_test.rb
rubylabs-0.7.1 test/encryption_test.rb
rubylabs-0.7.0 test/encryption_test.rb
rubylabs-0.6.4 test/encryption_test.rb