Created
March 4, 2014 17:00
-
-
Save blambeau/9350599 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
describe 'with an array with non bytes', -> | |
arg = [2, 4, -12] | |
subject = | |
try | |
type.dress(arg) | |
catch e | |
e | |
it 'should raise an error', -> | |
subject.should.be.an.instanceof(TypeError) | |
subject.message.should.equal("Invalid value `-12` for Byte") | |
it 'should have correct location', -> | |
subject.location.should.equal("2") | |
describe 'with an array with duplicates', -> | |
arg = [2, 4, 2] | |
subject = | |
try | |
type.dress(arg) | |
catch e | |
e | |
it 'should raise an error', -> | |
subject.should.be.an.instanceof(TypeError) | |
subject.message.should.equal("Duplicate value `2`") | |
it 'should have correct location', -> | |
subject.location.should.equal("2") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Message:
AssertionError: expected [ 2, 4, 2 ] to be an instance of TypeError