| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,17 @@ |
| 0 |
+module Rubysermon |
|
| 1 |
+ class OutputDriverTemplate |
|
| 2 |
+ |
|
| 3 |
+ def log |
|
| 4 |
+ throw OutputDriverTemplateException |
|
| 5 |
+ end |
|
| 6 |
+ |
|
| 7 |
+ end |
|
| 8 |
+ |
|
| 9 |
+ class OutputDriverTemplateException < Exception |
|
| 10 |
+ |
|
| 11 |
+ def initialize(msg = "Method not implemented") |
|
| 12 |
+ super(msg) |
|
| 13 |
+ end |
|
| 14 |
+ |
|
| 15 |
+ end |
|
| 16 |
+end |
|
| 0 | 17 |
\ No newline at end of file |
| 1 | 18 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,10 @@ |
| 0 |
+require_relative '../../test_helper.rb' |
|
| 1 |
+ |
|
| 2 |
+class OutputDriverTemplate_test < MiniTest::Unit::TestCase |
|
| 3 |
+ |
|
| 4 |
+ def test_exception_messages |
|
| 5 |
+ e = Rubysermon::ModTemplateException.new |
|
| 6 |
+ assert_equal("Method not implemented", e.message)
|
|
| 7 |
+ end |
|
| 8 |
+ |
|
| 9 |
+end |
|
| 0 | 10 |
\ No newline at end of file |