{"id":15487901,"url":"https://github.com/dblock/delayed_job_rspec","last_synced_at":"2025-04-05T06:24:29.556Z","repository":{"id":66277007,"uuid":"44829743","full_name":"dblock/delayed_job_rspec","owner":"dblock","description":"Patches Delayed::Job to run jobs immediately under RSpec.","archived":false,"fork":false,"pushed_at":"2015-10-23T21:01:30.000Z","size":148,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T14:13:02.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dblock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-23T18:01:50.000Z","updated_at":"2024-01-26T15:03:54.000Z","dependencies_parsed_at":"2023-03-10T23:47:07.730Z","dependency_job_id":null,"html_url":"https://github.com/dblock/delayed_job_rspec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dblock%2Fdelayed_job_rspec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dblock%2Fdelayed_job_rspec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dblock%2Fdelayed_job_rspec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dblock%2Fdelayed_job_rspec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dblock","download_url":"https://codeload.github.com/dblock/delayed_job_rspec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247296481,"owners_count":20915641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T06:43:47.902Z","updated_at":"2025-04-05T06:24:29.531Z","avatar_url":"https://github.com/dblock.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Delayed::Job::RSpec\n===================\n\n[![Gem Version](https://badge.fury.io/rb/delayed_job_rspec.svg)](http://badge.fury.io/rb/delayed_job_rspec)\n[![Build Status](https://travis-ci.org/dblock/delayed_job_rspec.svg?branch=master)](https://travis-ci.org/dblock/delayed_job_rspec)\n\n## DON'T USE ME\n\nI ended up not releasing this gem because it's unnecessary. To achieve this behavior:\n\n```ruby\nRSpec.configure do |config|\n  config.before do\n    Delayed::Worker.delay_jobs = false\n  end\nend\n```\n\nThis causes delayed jobs to fail in-line.\n\nYou can disable this behavior for a single test.\n\n```ruby\nDelayed::Worker.delay_jobs = true\n```\n\n## Why?\n\nMany applications rely on asynchronous behavior of delayed jobs. But having to explicitly invoke `Delayed::Worker.new.work_off` in RSpec tests is tedious. Furthermore jobs fail silently, having to constantly examine delayed jobs for error is annoying.\n\nThis gem patches `Delayed::Job` to run jobs immediately under RSpec and warns about failing ones. You can now create expectations from side effects of delayed jobs.\n\n## Installation\n\nAdd to Gemfile.\n\n```\ngroup :test do\n  gem 'delayed_job_rspec'\nend\n```\n\nRun `bundle install`.\n\n## Usage\n\nBehavior changes are reset before each spec - the following options will only affect the next example.\n\n### Disable Synchronous Behavior\n\n```ruby\nDelayed::Job.execute_asynchronously!\n```\n\n### Silence Failure Errors\n\nInstead of an error, show a warning.\n\n```ruby\nDelayed::Job.silence_errors!\n```\n\n### Silence Failure Warnings\n\nIgnore all errors, don't warn.\n\n```ruby\nDelayed::Job.silence_warnings!\n```\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## Copyright and License\n\nCopyright (c) 2015, [Daniel Doubrovkine](https://twitter.com/dblockdotorg), [Artsy](https://www.artsy.net) and [Contributors](CHANGELOG.md).\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdblock%2Fdelayed_job_rspec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdblock%2Fdelayed_job_rspec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdblock%2Fdelayed_job_rspec/lists"}