aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-06-21 11:47:32 -0500
committerJoshua Peek <josh@joshpeek.com>2012-06-21 11:47:32 -0500
commit2b712dc79082687c678f8b5d43b3f836b7c53753 (patch)
treecd0e8f87350d5a8fc6c8682cb2debc077a29b26d /test
parent3d7364877d6794f6cc2a86b493e893968a597332 (diff)
Guard against classify nil data
Diffstat (limited to 'test')
-rw-r--r--test/test_classifier.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_classifier.rb b/test/test_classifier.rb
index b39fb20..508aa08 100644
--- a/test/test_classifier.rb
+++ b/test/test_classifier.rb
@@ -55,6 +55,10 @@ class TestClassifier < Test::Unit::TestCase
assert results.first[1] < 0.5, results.first.inspect
end
+ def test_instance_classify_nil
+ assert_equal [], Classifier.instance.classify(nil)
+ end
+
def test_verify
assert Classifier.instance.verify
end