Skip to content

Fix lessthan greaterthan assertion messages#1034

Merged
nohwnd merged 17 commits intopester:masterfrom
nohwnd:fix-lessthan-greaterthan-assertion-messages
May 6, 2018
Merged

Fix lessthan greaterthan assertion messages#1034
nohwnd merged 17 commits intopester:masterfrom
nohwnd:fix-lessthan-greaterthan-assertion-messages

Conversation

@nohwnd
Copy link
Copy Markdown
Member

@nohwnd nohwnd commented May 6, 2018

Fix #1032

try { 1 | Should -BeGreaterThan 32 -Because "reasons" } catch { "$_" }
try { 1 | Should -Not -BeLessOrEqual 32 -Because "reasons" } catch { "$_" }
try { 1 | Should -BeGreaterOrEqual 32 -Because "reasons" } catch { "$_" }
try { 1 | Should -Not -BeLessThan 32 -Because "reasons" } catch { "$_" }
## before fix:
# Expected 32 to be greater than the actual value, because reasons, but got 1.
# Expected 32 to be greater than the actual value, because reasons, but got 1.
# Expected 32 to be greater or equal to the actual value, because reasons, but got 1.
# Expected 32 to be greater or equal to the actual value, because reasons, but got 1.
## after fix: 
# Expected the actual value to be greater than 32, because reasons, but got 1.
# Expected the actual value to be greater than 32, because reasons, but got 1.
# Expected the actual value to be greater than or equal to 32, because reasons, but got 1.
# Expected the actual value to be greater than or equal to 32, because reasons, but got 1.

try { 64 | Should -BeLessThan 2 -Because "reasons" } catch { "$_" }
try { 64 | Should -Not -BeGreaterOrEqual 2 -Because "reasons" } catch { "$_" }
try { 64 | Should -BeLessOrEqual 2 -Because "reasons" } catch { "$_" }
try { 64 | Should -Not -BeGreaterThan 2 -Because "reasons" } catch { "$_" }
## before fix:
# Expected 2 to be less than the actual value, because reasons, but got 64.
# Expected 2 to be less than the actual value, because reasons, but got 64.
# Expected 2 to be less or equal to the actual value, because reasons, but got 64.
# Expected 2 to be less or equal to the actual value, because reasons, but got 64.
## after fix:
# Expected the actual value to be less than 2, because reasons, but got 64.
# Expected the actual value to be less than 2, because reasons, but got 64.
# Expected the actual value to be less than or equal to 2, because reasons, but got 64.
# Expected the actual value to be less than or equal to 2, because reasons, but got 64.

@nohwnd nohwnd merged commit e58e45a into pester:master May 6, 2018
@nohwnd nohwnd deleted the fix-lessthan-greaterthan-assertion-messages branch January 11, 2019 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language used in error message when using 'not' and 'begreaterthan'

1 participant