{"action":"created","issue":{"url":"https://api.github.com/repos/leshill/resque_spec/issues/119","labels_url":"https://api.github.com/repos/leshill/resque_spec/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/leshill/resque_spec/issues/119/comments","events_url":"https://api.github.com/repos/leshill/resque_spec/issues/119/events","html_url":"https://github.com/leshill/resque_spec/issues/119","id":121612501,"number":119,"title":"expecting a Worker to have a queue size is broken.","user":{"login":"pboling","id":19505,"avatar_url":"https://avatars.githubusercontent.com/u/19505?v=3","gravatar_id":"","url":"https://api.github.com/users/pboling","html_url":"https://github.com/pboling","followers_url":"https://api.github.com/users/pboling/followers","following_url":"https://api.github.com/users/pboling/following{/other_user}","gists_url":"https://api.github.com/users/pboling/gists{/gist_id}","starred_url":"https://api.github.com/users/pboling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboling/subscriptions","organizations_url":"https://api.github.com/users/pboling/orgs","repos_url":"https://api.github.com/users/pboling/repos","events_url":"https://api.github.com/users/pboling/events{/privacy}","received_events_url":"https://api.github.com/users/pboling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-11T01:01:47Z","updated_at":"2016-01-18T20:52:01Z","closed_at":null,"body":"Here is the pry session where I discovered the issue (worker names changed).\r\n```\r\n    206:             # TODO: I can't understand why there are 2 jobs.\r\n    207:             #       I've done everything I can think of to isolate the test to the single job I expect enqueued.\r\n    208:             expect(OnlyOneLikeThis).to have_queue_size_of(2)\r\n => 209:             binding.pry\r\n    210:             expect(OnlyOneLikeThis).to have_queued(id: lead.id).in(:slow)\r\n\r\n[1] pry(#<RSpec::ExampleGroups::...::OnlyOneLikeThis>)> ResqueSpec.queues\r\n=> {\"slow\"=>[{:class=>\"DoOtherStuff\", :args=>[{:id=>1}]}, {:class=>\"OnlyOneLikeThis\", :args=>[{:id=>1}]}]}\r\n```\r\n\r\nThere were 2 jobs total, only one of them was for the worker `OnlyOneLikeThis`, and my expectation was, I thought, also for that worker: `expect(OnlyOneLikeThis).to have_queue_size_of(2)`, so I would have expected it to fail, since only one job was for that worker.\r\n\r\nPR to come shortly."},"comment":{"url":"https://api.github.com/repos/leshill/resque_spec/issues/comments/172650192","html_url":"https://github.com/leshill/resque_spec/issues/119#issuecomment-172650192","issue_url":"https://api.github.com/repos/leshill/resque_spec/issues/119","id":172650192,"user":{"login":"pboling","id":19505,"avatar_url":"https://avatars.githubusercontent.com/u/19505?v=3","gravatar_id":"","url":"https://api.github.com/users/pboling","html_url":"https://github.com/pboling","followers_url":"https://api.github.com/users/pboling/followers","following_url":"https://api.github.com/users/pboling/following{/other_user}","gists_url":"https://api.github.com/users/pboling/gists{/gist_id}","starred_url":"https://api.github.com/users/pboling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboling/subscriptions","organizations_url":"https://api.github.com/users/pboling/orgs","repos_url":"https://api.github.com/users/pboling/repos","events_url":"https://api.github.com/users/pboling/events{/privacy}","received_events_url":"https://api.github.com/users/pboling/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T20:52:01Z","updated_at":"2016-01-18T20:52:01Z","body":"I'll try to get to it soon."}}