Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

-Fixture issue #17 #25

Merged
devblackops merged 2 commits into PowerShell:master from ambsoerensen:fixtureissue17
Jun 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Describe "E2E validation of PSGallery" {
Describe "E2E validation of PSGallery" -fixture{
BeforeAll {
$Repository = "InternalPSGallery"
$ModuleName = "FormatTools"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Describe "Simple Validation of PSGallery" {
Describe -name "Simple Validation of PSGallery" {
It "The PowerShell Gallery should be responsive" {
$request = [System.Net.WebRequest]::Create("http://psget/psgallery")
$response = $Request.GetResponse()
Expand Down
15 changes: 13 additions & 2 deletions Modules/OperationValidation/OperationValidation.psm1
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,19 @@ function Get-TestFromScript
}, $true) |
ForEach-Object {
# This is the name of the 'describe' block
$describeName = ($_.CommandElements | Where-Object { $_.StaticType.name -eq 'string' })[1].SafeGetValue()

for ($x = 0; $x -lt $_.CommandElements.Count; $x++)
{
#Name parameter is named
if ($_.CommandElements[$x] -is [System.Management.Automation.Language.CommandParameterAst] -and $_.CommandElements[$x].ParameterName -eq 'Name')
{
$describeName = $_.CommandElements[$x + 1].value
}
#if we have a string without a parameter name, return first hit. Name parameter is at position 0.
ElseIf (($_.CommandElements[$x] -is [System.Management.Automation.Language.StringConstantExpressionAst]) -and ($_.CommandElements[$x - 1] -is [System.Management.Automation.Language.StringConstantExpressionAst]))
{
$describeName = $_.CommandElements[$x].value
}
}
$item = [PSCustomObject][ordered]@{
Name = $describeName
Tags = @()
Expand Down

AltStyle によって変換されたページ (->オリジナル) /