forked from dfinke/Tiny-PowerShell-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ps1
38 lines (31 loc) · 1.66 KB
/
test.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Describe "Test for 11_bottles_of_beer" {
BeforeAll {
$Script:prg = ".\bottles.ps1"
}
It "Should exist" {
Test-Path $Script:prg | Should -Be $true
}
It "Test one" {
$expected = @"
1 bottle of beer on the wall,
1 bottle of beer,
Take one down, pass it around,
No more bottles of beer on the wall!
"@
$actual = &$Script:prg -num 1
$actual | Should -Be $expected
}
It "Test two" {
$expected = '2 bottles of beer on the wall,
2 bottles of beer,
Take one down, pass it around,
1 bottle of beer on the wall!
1 bottle of beer on the wall,
1 bottle of beer,
Take one down, pass it around,
No more bottles of beer on the wall!
'
$actual = &$Script:prg -num 2
$actual | Should -BeExactly $expected
}
}