From 6d599a5c7b4797e9c6944d79c330b5a0b9531c25 Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Wed, 19 Jun 2019 12:58:15 -0400 Subject: [PATCH] Forgot that Exception doesn't imply Eq. --- test/Semantic/Spec.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/Semantic/Spec.hs b/test/Semantic/Spec.hs index e1b546297..74bad5333 100644 --- a/test/Semantic/Spec.hs +++ b/test/Semantic/Spec.hs @@ -1,6 +1,6 @@ module Semantic.Spec (spec) where -import Data.Either +import Control.Exception (fromException) import SpecHelpers import Data.Blob (NoLanguageForBlob (..)) @@ -20,7 +20,9 @@ spec = parallel $ do it "throws if given an unknown language for sexpression output" $ do res <- runTaskWithOptions defaultOptions (parseTermBuilder TermSExpression [setBlobLanguage Unknown methodsBlob]) - void res `shouldBe` Left (NoLanguageForBlob "methods.rb") + case res of + Left exc -> fromException exc `shouldBe` Just (NoLanguageForBlob "methods.rb") + Right _bad -> fail "Expected parseTermBuilder to fail for an unknown language" it "renders with the specified renderer" $ do output <- fmap runBuilder . runTaskOrDie $ parseTermBuilder TermSExpression [methodsBlob]