{"id":19520092,"url":"https://github.com/brett-richardson/rspec-assumptions","last_synced_at":"2026-06-09T01:32:40.478Z","repository":{"id":138957926,"uuid":"11255420","full_name":"brett-richardson/rspec-assumptions","owner":"brett-richardson","description":"Assume your setup for quick sanity tests in your specs.","archived":false,"fork":false,"pushed_at":"2013-07-08T14:23:51.000Z","size":712,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T00:25:50.232Z","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/brett-richardson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-08T13:47:54.000Z","updated_at":"2014-01-31T00:20:02.000Z","dependencies_parsed_at":"2023-03-11T11:41:28.041Z","dependency_job_id":null,"html_url":"https://github.com/brett-richardson/rspec-assumptions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brett-richardson/rspec-assumptions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brett-richardson%2Frspec-assumptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brett-richardson%2Frspec-assumptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brett-richardson%2Frspec-assumptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brett-richardson%2Frspec-assumptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brett-richardson","download_url":"https://codeload.github.com/brett-richardson/rspec-assumptions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brett-richardson%2Frspec-assumptions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34088013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-11T00:23:46.451Z","updated_at":"2026-06-09T01:32:40.465Z","avatar_url":"https://github.com/brett-richardson.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/brett-richardson/rspec-assumptions.png?branch=master)](https://travis-ci.org/brett-richardson/rspec-assumptions)\n\nUsing Rspec Assumptions\n=======================\n\nUse RSpec assumptions to debug your specs.\nOften when writing tests, you can find yourself testing your test set-up and not the subject itself.\nThat is where assumptions come in. Write an assumption about your test setup... and it will suceed silently.\nHowever, it will notify you of errors when it fails.\n\n\nUsing Rspec Assumptions is super simple.\n\n\nIn your Gemfile:\n```ruby\ngroup :development, :testing do\n  gem 'rspec-assumptions'\nend\n```\n\n\nIn your spec_helper.rb:\n```ruby\nrequire 'rspec/assumptions'\n```\n\n\nDefine an assumption with the 'assumption' method.\nIf it fails, it will notify you... and if it suceeds, it does so quietly.\n\n\n```ruby\ndescribe Apple do\n  let( :apple ){ create :apple }\n  let( :pear  ){ create :pear  }\n\n  describe '#+' do\n    subject{ apple + pear }\n    assume{ apple.class.should != pear.class }\n\n    it{ should be_a FruitSalad }\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrett-richardson%2Frspec-assumptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrett-richardson%2Frspec-assumptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrett-richardson%2Frspec-assumptions/lists"}