mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add helper method to retrieve languages by type
This commit is contained in:
@@ -368,6 +368,9 @@ class TestLanguage < Test::Unit::TestCase
|
||||
assert !Language['Ruby'].eql?(Language['Python'])
|
||||
end
|
||||
|
||||
def test_by_type
|
||||
assert_equal 6, Language.by_type(:prose).length
|
||||
end
|
||||
|
||||
def test_colorize
|
||||
assert_equal <<-HTML.chomp, Language['Ruby'].colorize("def foo\n 'foo'\nend\n")
|
||||
|
||||
Reference in New Issue
Block a user