Skip to content

Commit

Permalink
Copy global.json to directory under test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd committed Mar 14, 2021
1 parent 1dad56a commit f9bb6c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/MiniScaffold.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ module Tests =

Dotnet.New.cmd (fun opt -> { opt with WorkingDirectory = directory}) newArgs.ToStartInfo

let copyGlobalJson (directory : IO.DirectoryInfo) =
let globalJson = IO.Path.Join(__SOURCE_DIRECTORY__, "../../global.json")
let destination = IO.Path.Join(directory.FullName, "global.json")
IO.File.Copy(globalJson, destination)

let projectStructureAsserts = [
Assert.``CHANGELOG exists``
Expand Down Expand Up @@ -254,6 +258,7 @@ module Tests =

] |> Seq.map(fun (args, additionalAsserts) -> testCase args <| fun _ ->
use d = Disposables.DisposableDirectory.Create()
copyGlobalJson d.DirectoryInfo
showTemplateHelp <| Some d.Directory

runTemplate d.Directory args
Expand Down

0 comments on commit f9bb6c0

Please sign in to comment.