Skip to content

Instantly share code, notes, and snippets.

@pchw
Created May 20, 2014 10:58
Show Gist options
  • Save pchw/05bfeb7fd021c2ea55f8 to your computer and use it in GitHub Desktop.
Save pchw/05bfeb7fd021c2ea55f8 to your computer and use it in GitHub Desktop.
all property is available test
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