{"action":"opened","issue":{"url":"https://api.github.com/repos/jasmine/jasmine/issues/961","labels_url":"https://api.github.com/repos/jasmine/jasmine/issues/961/labels{/name}","comments_url":"https://api.github.com/repos/jasmine/jasmine/issues/961/comments","events_url":"https://api.github.com/repos/jasmine/jasmine/issues/961/events","html_url":"https://github.com/jasmine/jasmine/issues/961","id":114292797,"number":961,"title":"Cannot call createSpyObj with only name, not list of methods","user":{"login":"danfinnie","id":92105,"avatar_url":"https://avatars.githubusercontent.com/u/92105?v=3","gravatar_id":"","url":"https://api.github.com/users/danfinnie","html_url":"https://github.com/danfinnie","followers_url":"https://api.github.com/users/danfinnie/followers","following_url":"https://api.github.com/users/danfinnie/following{/other_user}","gists_url":"https://api.github.com/users/danfinnie/gists{/gist_id}","starred_url":"https://api.github.com/users/danfinnie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danfinnie/subscriptions","organizations_url":"https://api.github.com/users/danfinnie/orgs","repos_url":"https://api.github.com/users/danfinnie/repos","events_url":"https://api.github.com/users/danfinnie/events{/privacy}","received_events_url":"https://api.github.com/users/danfinnie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-30T15:31:44Z","updated_at":"2015-10-30T15:31:44Z","closed_at":null,"body":"jasmine.createSpyObj throws if you don't pass it any method names: https://github.com/jasmine/jasmine/blob/375a6f9fda57fdd896acce9abba7aca2e02b310a/src/core/base.js#L113\r\n\r\nWhy was this behavior added? My use case is that I'd like to ensure that a specific parameter was passed through to another function.  For instance:\r\n\r\n```js\r\nfunction iCallThings(a, b) {\r\n  a(b);\r\n}\r\n\r\na = jasmine.createSpy('a');\r\nb = jasmine.createSpyObj('b', []);\r\n\r\niCallThings(a, b);\r\nexpect(a).toHaveBeenCalledWith(b);\r\n```\r\n\r\nAFAIK, this test would work if it weren't for Jasmine checking the length of the array passed as the second argument to `createSpyObj`.  A solution right now is to do something like `b = {'b': true}`, but I'd prefer to use createSpyObj.  I'm fine with having to pass an empty array but I'd like to not have to pass a non-empty array.\r\n\r\nI can send out a PR for this if you agree that it'd be a positive change."}}