@@ -11,36 +11,36 @@ expectedAttributes =
1111 _id : 1234
1212
1313vows .describe (' User (models/user)' ).addBatch (
14- " When creating a user model" :
15- topic : () ->
16- new User ()
17- " it should have default values " : (user ) ->
14+ ' when creating a user model' : {
15+ topic : () -> new User ()
16+
17+ ' it should have default values ' : (user ) ->
1818 assert .isUndefined user .attributes .name
1919 assert .isUndefined user .attributes .userSince
2020 assert .isArray user .attributes .slugs
2121 assert .isArray user .attributes .handles
2222 assert .isArray user .attributes .credentials
23-
24- " Creating a user model from attributes " :
25- topic : () ->
26- new User expectedAttributes
23+ }
24+
25+ ' when creating a user model with attributes ' : {
26+ topic : () -> new User ( expectedAttributes)
2727
28- " it should set the correct name " : (user ) ->
28+ ' it should set the correct name ' : (user ) ->
2929 assert .equal user .attributes .name , expectedAttributes .name
3030
31- " it should set the correct user since date " : (user ) ->
31+ ' it should set the correct user since date ' : (user ) ->
3232 assert .equal user .attributes .userSince , expectedAttributes .userSince
3333
34- " it should set the correct slugs " : (user ) ->
34+ ' it should set the correct slugs ' : (user ) ->
3535 assert .deepEqual user .attributes .slugs , expectedAttributes .slugs
3636
37- " it should set the correct handles " : (user ) ->
37+ ' it should set the correct handles ' : (user ) ->
3838 assert .deepEqual user .attributes .handles , expectedAttributes .handles
3939
40- " it should set the correct credentials " : (user ) ->
40+ ' it should set the correct credentials ' : (user ) ->
4141 assert .deepEqual user .attributes .credentials , expectedAttributes .credentials
4242
43- " it should set the correct id " : (user ) ->
43+ ' it should set the correct id ' : (user ) ->
4444 assert .equal user .attributes ._id , expectedAttributes ._id
45-
45+ }
4646).export module
0 commit comments