forked from fsprojects/Paket
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInfoSpecs.fs
33 lines (24 loc) · 1.04 KB
/
InfoSpecs.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module Paket.IntegrationTests.InfoSpecs
open Fake
open System
open NUnit.Framework
open FsUnit
open System
open System.IO
open System.Diagnostics
[<Test>]
let ``#3200 info should locate paket.dependencies``() =
let repoDir = createScenarioDir "i003200-info-paketdeps-dir"
let subDir = repoDir </> "src" </> "app"
Directory.CreateDirectory(subDir) |> ignore
let ``paket info --paket-dependencies-dir`` workingDir =
directPaketInPathEx "info --paket-dependencies-dir" workingDir
|> Seq.map PaketMsg.getMessage
|> List.ofSeq
// paket.dependencies not exists
CollectionAssert.DoesNotContain(``paket info --paket-dependencies-dir`` repoDir, repoDir)
CollectionAssert.DoesNotContain(``paket info --paket-dependencies-dir`` subDir, repoDir)
// empty paket.dependencies
File.WriteAllText(repoDir </> "paket.dependencies", "")
CollectionAssert.Contains(``paket info --paket-dependencies-dir`` repoDir, repoDir)
CollectionAssert.Contains(``paket info --paket-dependencies-dir`` subDir, repoDir)