-Users = new Meteor.Collection "Users_meteor_related_tests"
-Posts = new Meteor.Collection "Posts_meteor_related_tests"
+Users = new Meteor.Collection 'Users_meteor_related_tests'
+Posts = new Meteor.Collection 'Posts_meteor_related_tests'
 
 intersectionObjects = (array, rest...) ->
   _.filter _.uniq(array), (item) ->

      @userId = Random.id()
      @countId = Random.id()

      @usersPostsSubscribe = Meteor.subscribe 'users-posts', @userId, expect()
      @usersPostsCount = Meteor.subscribe 'users-posts-count', @userId, @countId, expect()
  ,
    (test, expect) ->
      test.equal Posts.find().fetch(), []

      testSetEqual test, _.pluck(Posts.find().fetch(), '_id'), @posts
      test.equal Counts.findOne(@countId)?.count, @posts.length

      Meteor.subscribe 'posts', @posts,
        onReady: expect()
        onError: (error) ->
          test.exception error
      @usersPostsSubscribe.stop()

      # Let's wait a but for subscription to really stop
