From 211cb9567a6fd0eb1fc5fde0e4c8a488074950d9 Mon Sep 17 00:00:00 2001 From: ellemenno Date: Mon, 1 Dec 2014 01:37:55 -0500 Subject: [PATCH] refactor heuristic tests to use new helper --- test/test_heuristics.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 03b26415..0bd01bb5 100644 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -123,14 +123,10 @@ class TestHeuristcs < Test::Unit::TestCase end end - # Candidate languages = ["LiveScript", "LoomScript"] - def test_ls_livescript_by_heuristics - results = Heuristics.disambiguate_ls(fixture("LiveScript/hello.ls")) - assert_equal Language["LiveScript"], results.first - end - - def test_ls_loomscript_by_heuristics - results = Heuristics.disambiguate_ls(fixture("LoomScript/HelloWorld.ls")) - assert_equal Language["LoomScript"], results.first + def test_ls_by_heuristics + assert_heuristics({ + "LiveScript" => "LiveScript/hello.ls", + "LoomScript" => "LoomScript/HelloWorld.ls" + }) end end