1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

Express this a bit more elegantly

This commit is contained in:
Timothy Clem 2018-09-26 16:55:34 -05:00
parent caf23dcf39
commit 2d1a8cc7e7

View File

@ -16,9 +16,7 @@ spec = parallel $ do
output `shouldBe` "{\"trees\":[{\"error\":{\"path\":\"methods.rb\",\"language\":\"Unknown\",\"message\":\"NoLanguageForBlob \\\"methods.rb\\\"\"}}]}\n"
it "throws if given an unknown language for sexpression output" $ do
runTask (runParse SExpressionTermRenderer [methodsBlob { blobLanguage = Unknown }]) `shouldThrow` (\ code -> case code of
ExitFailure 1 -> True
_ -> False)
runTask (runParse SExpressionTermRenderer [methodsBlob { blobLanguage = Unknown }]) `shouldThrow` (== ExitFailure 1)
it "renders with the specified renderer" $ do
output <- fmap runBuilder . runTask $ runParse SExpressionTermRenderer [methodsBlob]