Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write-CuPesterTests dot sourcing needs double quotes #107

Open
Stephanevg opened this issue May 31, 2019 · 1 comment
Open

Write-CuPesterTests dot sourcing needs double quotes #107

Stephanevg opened this issue May 31, 2019 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Stephanevg
Copy link
Owner

Add support for dot sourcing with spaces in path
Result

. C:\Users\taavast3\OneDrive\UserGroups\Presentations\2019.06.PsConf2019\Learn classes with Class\Code\02.CheatingTDD.Class.Polymorphism.ps1
Describe '[Animal]-[Constructors]'{

}# end of Describe block
Describe '[Cat]-[Constructors]'{

It '[Cat]-[Constructor]([String]Name) should Not Throw' {

# -- Arrange


[String]$Name=''

# -- Act

# -- Assert

{[Cat]::New($Name)} | Should Not Throw 

}# end of it block

Should be

. "C:\Users\taavast3\OneDrive\UserGroups\Presentations\2019.06.PsConf2019\Learn classes with Class\Code\02.CheatingTDD.Class.Polymorphism.ps1"
Describe '[Animal]-[Constructors]'{

}# end of Describe block
Describe '[Cat]-[Constructors]'{

It '[Cat]-[Constructor]([String]Name) should Not Throw' {

# -- Arrange


[String]$Name=''

# -- Act

# -- Assert

{[Cat]::New($Name)} | Should Not Throw 

}# end of it block


@Stephanevg Stephanevg added bug Something isn't working good first issue Good for newcomers labels May 31, 2019
@LxLeChat
Copy link
Collaborator

Quick fix, change line 172, added simple quotes, in write-cupestertests.ps1

[void]$sb.AppendLine(". '$($File.Name)'")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants