From 2d1a8cc7e7782268194aceac120cbcf170e73386 Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Wed, 26 Sep 2018 16:55:34 -0500 Subject: [PATCH] Express this a bit more elegantly --- test/Semantic/Spec.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/Semantic/Spec.hs b/test/Semantic/Spec.hs index 7aeb22c50..f53cb9019 100644 --- a/test/Semantic/Spec.hs +++ b/test/Semantic/Spec.hs @@ -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]