{"issue":{"title":"Testing for errors","user":{"login":"Phoscur","id":191093,"url":"https://api.github.com/users/Phoscur","avatar_url":"https://secure.gravatar.com/avatar/14443b032be6478193bb2bd47c5e6cc6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"14443b032be6478193bb2bd47c5e6cc6"},"created_at":"2011-12-27T20:03:57Z","milestone":null,"state":"closed","updated_at":"2011-12-28T16:31:06Z","labels":[],"id":2665889,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"closed_at":"2011-12-28T16:31:06Z","html_url":"https://github.com/cloudhead/vows/issues/173","body":"Related: #132\r\n\r\nI'm trying to test for a failure when two objects interact, a's method interact() throws an error. I'm not sure how to really do this, I can't get parent topics in the vow, so I can't trigger the error in the vow without writing a helper topic putting current and parent topic together in an object, which is clumsy.\r\n\r\nMaybe my problem is that I dont know how I have to write failing tests in vows, or I don't get the vow/topic separation. I ran into enough problems with vows for now, I'll try another testing framework.\r\n\r\n```javascript\r\n'A': {\r\n    topic: new A,\r\n    'and B': {\r\n        topic: new B,\r\n        'interact': {\r\n            topic: function(b, a) {\r\n                return a.interact(b) // throws an error\r\n            },\r\n            'should fail': function(topic) {\r\n                assert.fail(topic)\r\n            }\r\n         },\r\n         'interact fails': function(b, a) {\r\n             console.dir(arguments) // [null (??!), B]\r\n         }\r\n         ....\r\n```","number":173,"url":"https://api.github.com/repos/cloudhead/vows/issues/173","comments":1,"assignee":null},"action":"closed"}