$expect = new Expectation(2); $expect->toBeBelow(1); }); }); }); context('notToBeBelow', function () { it('returns if the value is not less than the min', function () { shouldReturn(function () { $expect = new Expectation(2); $expect->notToBeBelow(1); }); }); it('throws exception if the value is less than the min', function () { shouldThrowException(function () { $expect = new Expectation(1); $expect->notToBeBelow(2); }); }); }); context('toBeWithin', function () { it('returns if the value is within the range', function () { shouldReturn(function () { $expect = new Expectation(1); $expect->toBeWithin(1, 2); }); }); it('throws exception if it is not within the range', function () { shouldThrowException(function () { $expect = new Expectation(1.1); $expect->toBeWithin(0, 1); });