From 652da3c47ee4df492192d27003a4406cf515dec3 Mon Sep 17 00:00:00 2001 From: Scott Muc Date: Mon, 23 May 2011 21:45:01 -0700 Subject: [PATCH] Creates empty implementation of the function under test --- Create-Fixture.ps1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Create-Fixture.ps1 b/Create-Fixture.ps1 index 1ed8fe97c..e9e616fc0 100644 --- a/Create-Fixture.ps1 +++ b/Create-Fixture.ps1 @@ -32,7 +32,11 @@ if (-not (Test-Path $path)) { & md $path | Out-Null } -$template = "`$pwd = Split-Path -Parent `$MyInvocation.MyCommand.Path +$test_code = "function $name { + +}" + +$fixture_code = "`$pwd = Split-Path -Parent `$MyInvocation.MyCommand.Path `$sut = (Split-Path -Leaf `$MyInvocation.MyCommand.Path).Replace(`".Tests.`", `".`") . `"`$pwd\`$sut`" . `"`$pwd\$rel_path_to_pester`" @@ -44,5 +48,5 @@ Describe `"$name`" { } }" -Create-File "$path\$name.ps1" -Create-File "$path\$name.Tests.ps1" $template +Create-File "$path\$name.ps1" $test_code +Create-File "$path\$name.Tests.ps1" $fixture_code