{"action":"created","issue":{"url":"https://api.github.com/repos/paulbutcher/ScalaMock/issues/99","labels_url":"https://api.github.com/repos/paulbutcher/ScalaMock/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/paulbutcher/ScalaMock/issues/99/comments","events_url":"https://api.github.com/repos/paulbutcher/ScalaMock/issues/99/events","html_url":"https://github.com/paulbutcher/ScalaMock/issues/99","id":59226341,"number":99,"title":"remove an `atLeastOnce` expectation?","user":{"login":"fommil","id":1914041,"avatar_url":"https://avatars.githubusercontent.com/u/1914041?v=3","gravatar_id":"","url":"https://api.github.com/users/fommil","html_url":"https://github.com/fommil","followers_url":"https://api.github.com/users/fommil/followers","following_url":"https://api.github.com/users/fommil/following{/other_user}","gists_url":"https://api.github.com/users/fommil/gists{/gist_id}","starred_url":"https://api.github.com/users/fommil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fommil/subscriptions","organizations_url":"https://api.github.com/users/fommil/orgs","repos_url":"https://api.github.com/users/fommil/repos","events_url":"https://api.github.com/users/fommil/events{/privacy}","received_events_url":"https://api.github.com/users/fommil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-27T11:48:48Z","updated_at":"2015-02-27T14:09:59Z","closed_at":null,"body":"I am mocking an I/O access object which has a method something like \"getLatestNumber\".\r\n\r\nI don't really care about testing how many times it is called, so I put `atLeastOnce` on it, but in some of my tests I want to *change* the expectation in the middle of a test to mock out a change in state.\r\n\r\nThe problem is that the first expectation always trumps and my replacement is ignored. Is this intentional? Is there a workaround?\r\n\r\nI am working around with `onCall` but that means I have to store my expectation in a mutable variable at the test class level because of the way the code is organised, which is a bit nasty."},"comment":{"url":"https://api.github.com/repos/paulbutcher/ScalaMock/issues/comments/76399472","html_url":"https://github.com/paulbutcher/ScalaMock/issues/99#issuecomment-76399472","issue_url":"https://api.github.com/repos/paulbutcher/ScalaMock/issues/99","id":76399472,"user":{"login":"paulbutcher","id":61163,"avatar_url":"https://avatars.githubusercontent.com/u/61163?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbutcher","html_url":"https://github.com/paulbutcher","followers_url":"https://api.github.com/users/paulbutcher/followers","following_url":"https://api.github.com/users/paulbutcher/following{/other_user}","gists_url":"https://api.github.com/users/paulbutcher/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbutcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbutcher/subscriptions","organizations_url":"https://api.github.com/users/paulbutcher/orgs","repos_url":"https://api.github.com/users/paulbutcher/repos","events_url":"https://api.github.com/users/paulbutcher/events{/privacy}","received_events_url":"https://api.github.com/users/paulbutcher/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T14:09:59Z","updated_at":"2015-02-27T14:09:59Z","body":"Oh! Got you. And you can't determine that this method is \"the one\" from the arguments passed to it or the number of calls beforehand?"}}