Easy way to mark a test as pending?

30 views
Skip to first unread message

cra...@gmail.com

unread,
Jun 11, 2015, 11:00:05 AM6/11/15
to pes...@googlegroups.com
Is there an easy way to mark a test as pending?

$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut
= (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"

Describe "something" {

 
# pending because script block is empty
 
It "Should do something" {
 
}

 
# pending because each line in script block has been disabled
 
It "Should do something else" {
   
# $false | Should Be $true
 
}

 
# not disabled
 
It "Should do another thing" {
     $false
| Should Be $true
 
}

 
# RSpec-styled syntax generates an error
 
xIt "Should do do" {
    $false
| Should be $true
 
}

}



I suppose I could use the -Tag parameter, but I'm not sure how do invoke it when running the test script from the ISE (via F5).

Dave Wyatt

unread,
Jun 11, 2015, 11:28:29 AM6/11/15
to cra...@gmail.com, pes...@googlegroups.com
The It command has a -Pending switch that you can use for that.

--
You received this message because you are subscribed to the Google Groups "Pester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pester+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages