Actually return the strategy

This commit is contained in:
Arfon Smith
2015-03-05 13:21:07 -06:00
parent 1bc1803628
commit a1010b8cf8
2 changed files with 10 additions and 3 deletions

View File

@@ -38,7 +38,13 @@ class TestInstrumentation < Minitest::Test
blob = fixture_blob("Data/Modelines/ruby")
Language.detect(blob)
detect_event = Linguist.instrumenter.events.last
detect_event_payload = detect_event[:args].first
assert_equal 3, Linguist.instrumenter.events.size
assert_equal "linguist.detected", Linguist.instrumenter.events.last.name
assert_equal "linguist.detected", detect_event.name
assert_equal Language['Ruby'], detect_event_payload[:language]
assert_equal blob, detect_event_payload[:blob]
assert_equal Linguist::Strategy::Modeline, detect_event_payload[:strategy]
end
end