 
     describe 'when called with no arguments', ->
       it 'should return a value between 0 and 1', ->
-        expect(random()).to.be.above(0).and.below(1)
+        expect(random()).to.be.within(0, 1)
 
     describe 'when called with one argument', ->
-      it 'should return a value between 0 and the argument', ->
-        expect(random(10)).to.be.above(0).and.below(10)
+      it 'should return a value between 1 and the argument, inclusively', ->
+        expect(random(10)).to.be.within(1, 10 + 1)
 
     describe 'when called with two arguments', ->
-      it 'should return a value between the two arguments', ->
-        expect(random(5, 10)).to.be.above(5).and.below(10)
+      it 'should return a value between the two arguments, inclusively', ->
+        expect(random(5, 10)).to.be.within(5, 10 + 1)

      it 'should return values between -1 and 1', ->
        for x in [0..10]
          for y in [0..10]
            expect(noise(x, y)).to.be.above(-1).and.below(1)

      it 'should return similar values for similar inputs', ->
        expect(Math.abs(noise(0.1, 0.2) - noise(0.101, 0.201))).to.be.below(0.1).and.above(0)


      it 'should return values between -1 and 1', ->
        for x in [0..10]
          expect(noise(x)).to.be.within(-1, 1)

      it 'should return similar values for similar inputs', ->
        expect(Math.abs(noise(0.1) - noise(0.101))).to.be.below(0.1).and.above(0)
