mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
Fix a spec.
This commit is contained in:
parent
55c349bc0f
commit
7696adfc97
@ -9,6 +9,7 @@ module Semantic.IO.Spec (spec) where
|
||||
import Prelude hiding (readFile)
|
||||
|
||||
import Analysis.File as File
|
||||
import Analysis.Reference as Ref
|
||||
import Data.Blob as Blob
|
||||
import Data.Handle
|
||||
import SpecHelpers
|
||||
@ -30,11 +31,11 @@ spec = do
|
||||
|
||||
it "returns a blob for extant files" $ do
|
||||
let path = Fixture.absRelFile "test/fixtures/cli/diff.json"
|
||||
Just blob <- readBlobFromFile (File path lowerBound Unknown)
|
||||
Just blob <- readBlobFromFile (File (Reference path lowerBound) Unknown)
|
||||
blobFilePath blob `shouldBe` Path.toString path
|
||||
|
||||
it "throws for absent files" $ do
|
||||
readBlobFromFile (File (Path.absRel "/dev/doesnotexist") lowerBound Unknown) `shouldThrow` anyIOException
|
||||
readBlobFromFile (File (Reference (Path.absRel "/dev/doesnotexist") lowerBound) Unknown) `shouldThrow` anyIOException
|
||||
|
||||
describe "readBlobPairsFromHandle" $ do
|
||||
let a = Blob.fromSource (Path.relFile "method.rb") Ruby "def foo; end"
|
||||
|
Loading…
Reference in New Issue
Block a user