{"action":"created","issue":{"url":"https://api.github.com/repos/pivotal/cedar/issues/326","labels_url":"https://api.github.com/repos/pivotal/cedar/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/pivotal/cedar/issues/326/comments","events_url":"https://api.github.com/repos/pivotal/cedar/issues/326/events","html_url":"https://github.com/pivotal/cedar/issues/326","id":73749635,"number":326,"title":"Checking that a method was called twice with different values","user":{"login":"JamieREvans","id":2151018,"avatar_url":"https://avatars.githubusercontent.com/u/2151018?v=3","gravatar_id":"","url":"https://api.github.com/users/JamieREvans","html_url":"https://github.com/JamieREvans","followers_url":"https://api.github.com/users/JamieREvans/followers","following_url":"https://api.github.com/users/JamieREvans/following{/other_user}","gists_url":"https://api.github.com/users/JamieREvans/gists{/gist_id}","starred_url":"https://api.github.com/users/JamieREvans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamieREvans/subscriptions","organizations_url":"https://api.github.com/users/JamieREvans/orgs","repos_url":"https://api.github.com/users/JamieREvans/repos","events_url":"https://api.github.com/users/JamieREvans/events{/privacy}","received_events_url":"https://api.github.com/users/JamieREvans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-06T22:00:58Z","updated_at":"2015-05-07T04:33:24Z","closed_at":null,"body":"I'm trying to verify that a method gets called twice with specific values, but I can't seem to verify both calls, just the first. I have verified that the method is called twice and that the values are correct, but I'm not sure how to write the cedar spec.\r\n\r\nHere is what I have:\r\n\r\n            it(@\"should call sleep with time intervals of 0 and 5\", ^{\r\n                \r\n                // subject is a spied on object\r\n                subject should have_received(@selector(someMethod:)).with(0); // Passes\r\n                subject should have_received(@selector(someMethod:)).with(5); // Fails\r\n            }  \r\n\r\n\r\nThe error I'm getting is this:\r\n\r\n    Expected <MyObject> to have received message <someMethod:>, with arguments: <5> but received messages:\r\n      someMethod:<0>\r\n      someMethod:<5>\r\n\r\nAlso, it doesn't seem you can verify that a method was called a specific number of times without overriding the invocation and tracking the count."},"comment":{"url":"https://api.github.com/repos/pivotal/cedar/issues/comments/99710017","html_url":"https://github.com/pivotal/cedar/issues/326#issuecomment-99710017","issue_url":"https://api.github.com/repos/pivotal/cedar/issues/326","id":99710017,"user":{"login":"akitchen","id":378648,"avatar_url":"https://avatars.githubusercontent.com/u/378648?v=3","gravatar_id":"","url":"https://api.github.com/users/akitchen","html_url":"https://github.com/akitchen","followers_url":"https://api.github.com/users/akitchen/followers","following_url":"https://api.github.com/users/akitchen/following{/other_user}","gists_url":"https://api.github.com/users/akitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/akitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akitchen/subscriptions","organizations_url":"https://api.github.com/users/akitchen/orgs","repos_url":"https://api.github.com/users/akitchen/repos","events_url":"https://api.github.com/users/akitchen/events{/privacy}","received_events_url":"https://api.github.com/users/akitchen/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T04:33:24Z","updated_at":"2015-05-07T04:33:24Z","body":"Oh, I realized it right after posting. It appears to be an ```NSTimeInterval```, which is ```typedef double```\r\n\r\nThis probably boils down to a failure to match floating point numbers. The equality matcher has the same problem, which is the reason for ```be_close_to().within()```"}}