Created
May 20, 2014 10:58
-
-
Save pchw/05bfeb7fd021c2ea55f8 to your computer and use it in GitHub Desktop.
all property is available test
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
should = require 'should' | |
method = (a, b)-> | |
unless a and b | |
return false | |
return true | |
describe 'logical test', -> | |
it 'missing a', -> | |
r = method false, true | |
r.should.be.equal false | |
it 'missing b', -> | |
r = method true, false | |
r.should.be.equal false | |
it 'missing both', -> | |
r = method false, false | |
r.should.be.equal false | |
it 'all ok', -> | |
r = method true, true | |
r.should.be.equal true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment