Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 6d599a5

Browse files
author
Patrick Thomson
committed
Forgot that Exception doesn't imply Eq.
1 parent 9e2b0e3 commit 6d599a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/Semantic/Spec.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Semantic.Spec (spec) where
22

3-
import Data.Either
3+
import Control.Exception (fromException)
44
import SpecHelpers
55

66
import Data.Blob (NoLanguageForBlob (..))
@@ -20,7 +20,9 @@ spec = parallel $ do
2020

2121
it "throws if given an unknown language for sexpression output" $ do
2222
res <- runTaskWithOptions defaultOptions (parseTermBuilder TermSExpression [setBlobLanguage Unknown methodsBlob])
23-
void res `shouldBe` Left (NoLanguageForBlob "methods.rb")
23+
case res of
24+
Left exc -> fromException exc `shouldBe` Just (NoLanguageForBlob "methods.rb")
25+
Right _bad -> fail "Expected parseTermBuilder to fail for an unknown language"
2426

2527
it "renders with the specified renderer" $ do
2628
output <- fmap runBuilder . runTaskOrDie $ parseTermBuilder TermSExpression [methodsBlob]

0 commit comments

Comments
 (0)