Skip to content

Instantly share code, notes, and snippets.

@mallibone
Created June 7, 2017 06:24
Show Gist options
  • Save mallibone/c392a5393a8d0554d79973594f637454 to your computer and use it in GitHub Desktop.
Save mallibone/c392a5393a8d0554d79973594f637454 to your computer and use it in GitHub Desktop.
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.'
. "$here\$sut"
Describe "IsEvenNumber" {
Context "When an even number is passed to the function" {
$result = IsEvenNumber(42)
It "Returns true" {
$result | Should Be $true
}
}
Context "When an uneven number is passed to the function" {
$result = IsEvenNumber(1337)
It "Returns false" {
$result | Should Be $false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment