11vows = require ' vows'
2- assert = require ' assert '
2+ should = require ' should '
33User = require ' ../../models/user'
44
55expectedAttributes =
@@ -15,32 +15,32 @@ vows.describe('User (models/user)').addBatch(
1515 topic : () -> new User ()
1616
1717 ' it should have default values ' : (user ) ->
18- assert . isUndefined user .attributes .name
19- assert . isUndefined user .attributes .userSince
20- assert . isArray user .attributes .slugs
21- assert . isArray user .attributes .handles
22- assert . isArray user .attributes .credentials
18+ should . strictEqual ( user .attributes .name , undefined )
19+ should . strictEqual ( user .attributes .userSince , undefined )
20+ user .attributes .slugs . should . have . length ( 0 )
21+ user .attributes .handles . should . have . length ( 0 )
22+ user .attributes .credentials . should . have . length ( 0 )
2323 }
2424
2525 ' when creating a user model with attributes' : {
2626 topic : () -> new User (expectedAttributes)
2727
2828 ' it should set the correct name ' : (user ) ->
29- assert . equal user .attributes .name , expectedAttributes .name
29+ user .attributes .name . should . equal ( expectedAttributes .name )
3030
3131 ' it should set the correct user since date ' : (user ) ->
32- assert . equal user .attributes .userSince , expectedAttributes .userSince
32+ user .attributes .userSince . should . equal ( expectedAttributes .userSince )
3333
3434 ' it should set the correct slugs ' : (user ) ->
35- assert . deepEqual user .attributes .slugs , expectedAttributes .slugs
35+ user .attributes .slugs . should . eql ( expectedAttributes .slugs )
3636
3737 ' it should set the correct handles ' : (user ) ->
38- assert . deepEqual user .attributes .handles , expectedAttributes .handles
38+ user .attributes .handles . should . eql ( expectedAttributes .handles )
3939
4040 ' it should set the correct credentials ' : (user ) ->
41- assert . deepEqual user .attributes .credentials , expectedAttributes .credentials
41+ user .attributes .credentials . should . eql ( expectedAttributes .credentials )
4242
4343 ' it should set the correct id ' : (user ) ->
44- assert . equal user .attributes ._id , expectedAttributes ._id
44+ user .attributes ._id . should . equal ( expectedAttributes ._id )
4545 }
46- ).export module
46+ ).export ( module )
0 commit comments