forked from pester/Pester
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Set-StrictMode -Version Latest | ||
|
||
InModuleScope Pester { | ||
Describe "PesterContainMultiline" { | ||
Context "when testing file contents" { | ||
Setup -File "test.txt" "this is line 1`nthis is line 2`nPester is awesome" | ||
It "returns true if the file matches the specified content on one line" { | ||
"$TestDrive\test.txt" | Should ContainMultiline "Pester" | ||
} | ||
|
||
It "returns true if the file matches the specified content across multiple lines" { | ||
"$TestDrive\test.txt" | Should ContainMultiline "line 2`nPester" | ||
} | ||
|
||
It "returns false if the file does not contain the specified content" { | ||
"$TestDrive\test.txt" | Should Not ContainMultiline "Pastor" | ||
} | ||
} | ||
} | ||
} |