{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/1578","repository_url":"https://api.github.com/repos/rspec/rspec-rails","labels_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1578/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1578/comments","events_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1578/events","html_url":"https://github.com/rspec/rspec-rails/pull/1578","id":141135475,"number":1578,"title":"Support `with` block in `have_enqueued_job` matcher","user":{"login":"jschroeder9000","id":3663758,"avatar_url":"https://avatars.githubusercontent.com/u/3663758?v=3","gravatar_id":"","url":"https://api.github.com/users/jschroeder9000","html_url":"https://github.com/jschroeder9000","followers_url":"https://api.github.com/users/jschroeder9000/followers","following_url":"https://api.github.com/users/jschroeder9000/following{/other_user}","gists_url":"https://api.github.com/users/jschroeder9000/gists{/gist_id}","starred_url":"https://api.github.com/users/jschroeder9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jschroeder9000/subscriptions","organizations_url":"https://api.github.com/users/jschroeder9000/orgs","repos_url":"https://api.github.com/users/jschroeder9000/repos","events_url":"https://api.github.com/users/jschroeder9000/events{/privacy}","received_events_url":"https://api.github.com/users/jschroeder9000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-16T00:25:27Z","updated_at":"2016-04-06T06:05:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-rails/pulls/1578","html_url":"https://github.com/rspec/rspec-rails/pull/1578","diff_url":"https://github.com/rspec/rspec-rails/pull/1578.diff","patch_url":"https://github.com/rspec/rspec-rails/pull/1578.patch"},"body":"Fixes #1576."},"comment":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/comments/206131804","html_url":"https://github.com/rspec/rspec-rails/pull/1578#issuecomment-206131804","issue_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1578","id":206131804,"user":{"login":"morgoth","id":10766,"avatar_url":"https://avatars.githubusercontent.com/u/10766?v=3","gravatar_id":"","url":"https://api.github.com/users/morgoth","html_url":"https://github.com/morgoth","followers_url":"https://api.github.com/users/morgoth/followers","following_url":"https://api.github.com/users/morgoth/following{/other_user}","gists_url":"https://api.github.com/users/morgoth/gists{/gist_id}","starred_url":"https://api.github.com/users/morgoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgoth/subscriptions","organizations_url":"https://api.github.com/users/morgoth/orgs","repos_url":"https://api.github.com/users/morgoth/repos","events_url":"https://api.github.com/users/morgoth/events{/privacy}","received_events_url":"https://api.github.com/users/morgoth/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T06:05:20Z","updated_at":"2016-04-06T06:05:20Z","body":"Correct me if I'm wrong, but this solution still doesn't fix a problem with case when you want to match on dynamic values created inside job, like:\r\n\r\n```ruby\r\nexpect {\r\n  user = CreateUser.call\r\n}.to have_enqueued_job(DeliverWelcomeEmailJob).with { |arg|\r\n  expect(arg).to eq(user)\r\n}\r\n```"}}