Pester Question

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Callum Shackleton Callum Shackleton 4 months, 4 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38636
    Profile photo of Callum Shackleton
    Callum Shackleton
    Participant

    Hi guys,

    I'm wondering if you can help me out, I feel like I'm missing something simple.

    In Pester I want to test that an integer is of a certain value or higher, a pseudo example would be:

    2 | Should be -gt 1

    Is this possible in Pester? I read somewhere that you can use "Should Be Greater Than" but the test fails because it thinks I'm trying to match against the string of "greater".

    Any help is appreciated.

    Kind regards,
    Callum

    #38637
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    It's Should BeGreaterThan ; no spaces between "Be", "Greater" and "Than". 🙂

    #38639
    Profile photo of Callum Shackleton
    Callum Shackleton
    Participant

    Thanks Dave!

    I literally found the answer 1 min after posting, I was a little post happy I think.

    It pays to browse through the module files first 🙂

    Cheers,
    Callum

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.