Class: TC_KeyingAlgorithms
- Defined in:
- lib/quiz1/t/solutions/Jamis Buck/test/tc_keying-algorithms.rb
Defined Under Namespace
Classes: MockRegistry
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
14 15 16 17 18 |
# File 'lib/quiz1/t/solutions/Jamis Buck/test/tc_keying-algorithms.rb', line 14 def setup @algorithms = KeyingAlgorithms.new @algorithms.algorithms = { "mock" => "something.mock" } @algorithms.registry = MockRegistry.new end |
#test_get_found ⇒ Object
26 27 28 29 |
# File 'lib/quiz1/t/solutions/Jamis Buck/test/tc_keying-algorithms.rb', line 26 def test_get_found svc = @algorithms.get( "mock" ) assert_equal svc, "found" end |
#test_get_not_found ⇒ Object
20 21 22 23 24 |
# File 'lib/quiz1/t/solutions/Jamis Buck/test/tc_keying-algorithms.rb', line 20 def test_get_not_found assert_raise( RuntimeError ) do @algorithms.get( "bogus" ) end end |