Sha256: 58d3de4b3d726f0d6952a51031876f2ec78b632816f6218dba63615e48af8457

Contents?: true

Size: 841 Bytes

Versions: 10

Compression:

Stored size: 841 Bytes

Contents

function ConvertFrom-PesterOutputObject {
  param (
    [parameter(ValueFromPipeline=$true)]
    [object]
    $InputObject
  )
  begin {
    $PesterModule = Import-Module Pester -Passthru
  }
  process {
    $DescribeGroup = $InputObject.testresult | Group-Object Describe
    foreach ($DescribeBlock in $DescribeGroup) {
      $PesterModule.Invoke({Write-Screen $args[0]}, "Describing $($DescribeBlock.Name)")
      $ContextGroup = $DescribeBlock.group | Group-Object Context
      foreach ($ContextBlock in $ContextGroup) {
        $PesterModule.Invoke({Write-Screen $args[0]}, "`tContext $($subheader.name)")
        foreach ($TestResult in $ContextBlock.group) {
          $PesterModule.Invoke({Write-PesterResult $args[0]}, $TestResult)
        }
      }
    }
    $PesterModule.Invoke({Write-PesterReport $args[0]}, $InputObject)
  }
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kitchen-pester-0.12.2 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.12.1 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.12.0 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.11.0 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.10.0 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.9.1 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.9.0 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.8.0 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.7.1 lib/support/powershell/PesterUtil/PesterUtil.psm1
kitchen-pester-0.7.0 lib/support/powershell/PesterUtil/PesterUtil.psm1