Sha256: ff910307ad9043573f974388609299be9ba8f1f6871af7cbb7d1059a97352730
Contents?: true
Size: 640 Bytes
Versions: 3
Compression:
Stored size: 640 Bytes
Contents
$: << File.join( File.dirname( __FILE__ ), "..", "lib" ) require 'test/unit' require 'cipher' class TC_KeyingAlgorithms < Test::Unit::TestCase class MockRegistry def service( name ) return "found" if name == "something.mock" return nil end end def setup @algorithms = KeyingAlgorithms.new @algorithms.algorithms = { "mock" => "something.mock" } @algorithms.registry = MockRegistry.new end def test_get_not_found assert_raise( RuntimeError ) do @algorithms.get( "bogus" ) end end def test_get_found svc = @algorithms.get( "mock" ) assert_equal svc, "found" end end
Version data entries
3 entries across 3 versions & 2 rubygems