Skip to content

Commit

Permalink
make first check in integration tests for loading scripts generation
Browse files Browse the repository at this point in the history
  • Loading branch information
smoothdeveloper committed May 3, 2016
1 parent a3a6685 commit e939078
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,38 @@
open NUnit.Framework
open Paket.IntegrationTests.TestHelpers
open System.IO
open Paket

let paket command scenario =
paket command (Path.Combine("loading-scripts-scenarios", scenario))
let makeScenarioPath scenario = Path.Combine("loading-scripts-scenarios", scenario)
let paket command scenario = paket command (makeScenarioPath scenario)
let directPaket command scenario = directPaket command (makeScenarioPath scenario)
let scenarioTempPath scenario = scenarioTempPath (makeScenarioPath scenario)

let getGeneratedScriptFiles framework scenario =
let directory =
Path.Combine(scenarioTempPath scenario, "paket-files", "include-scripts", (FrameworkDetection.Extract framework).Value |> string)
|> DirectoryInfo

directory.GetFiles()

[<Test>]
let ``simple dependencies generates expected scripts``() =
paket "install" "simple-dependencies" |> ignore
// todo
()
let scenario = "simple-dependencies"
let framework = "net4"
paket "install" scenario |> ignore


directPaket (sprintf "generate-include-scripts framework %s" framework) scenario |> ignore

let files = getGeneratedScriptFiles framework scenario
let actualFiles = files |> Array.map (fun f -> f.Name)
let expectedFiles = [|
"include.argu.csx"
"include.argu.fsx"
"include.log4net.csx"
"include.log4net.fsx"
"include.nunit.csx"
"include.nunit.fsx"
|]
Assert.AreEqual(expectedFiles, actualFiles)

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source "http://nuget.org/api/v2"
nuget NUnit ~> 2
nuget Argu ~> 1
nuget Argu ~> 1
nuget log4net ~> 1

0 comments on commit e939078

Please sign in to comment.