Permalink
Browse files

Fix for latest should

  • Loading branch information...
1 parent a3c4b50 commit ef41a81d83e5c0d9cb24e713cf4a8dfe8a983a3b @wdavidw wdavidw committed May 21, 2012
Showing with 14 additions and 5 deletions.
  1. +14 −5 test/schema_temporal.coffee
@@ -26,8 +26,12 @@ describe 'type', ->
Records.clear (err) ->
Records.create {}, (err, record) ->
should.not.exist err
- record.cdate.should.be.an.instanceof Date
- record.mdate.should.be.an.instanceof Date
+ # should v0.6.3 is broken with "instanceof Date"
+ # https://github.com/visionmedia/should.js/issues/65
+ (record.cdate instanceof Date).should.be.true
+ (record.mdate instanceof Date).should.be.true
+ # record.cdate.should.be.an.instanceof Date
+ # record.mdate.should.be.an.instanceof Date
next()
it 'should deal with update', (next) ->
@@ -42,7 +46,12 @@ describe 'type', ->
cdate = record.cdate
Records.update record, (err, record) ->
should.not.exist err
- record.cdate.should.be.an.instanceof Date
- record.cdate.should.eql cdate
- record.mdate.should.be.an.instanceof Date
+ # should v0.6.3 is broken with "instanceof Date"
+ # https://github.com/visionmedia/should.js/issues/65
+ (record.cdate is cdate).should.be.true
+ (record.cdate instanceof Date).should.be.true
+ (record.mdate instanceof Date).should.be.true
+ # record.cdate.should.eql cdate
+ # record.cdate.should.be.an.instanceof Date
+ # record.mdate.should.be.an.instanceof Date
next()

0 comments on commit ef41a81

Please sign in to comment.