{"id":22378911,"url":"https://github.com/codebrahma/factory_group","last_synced_at":"2025-09-12T13:40:31.455Z","repository":{"id":20681419,"uuid":"23964494","full_name":"Codebrahma/factory_group","owner":"Codebrahma","description":"An abstraction on top of factory girl","archived":false,"fork":false,"pushed_at":"2014-10-26T08:17:14.000Z","size":1420,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-08-27T14:47:55.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Codebrahma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-12T14:49:06.000Z","updated_at":"2019-08-14T15:16:03.000Z","dependencies_parsed_at":"2022-08-19T20:10:16.304Z","dependency_job_id":null,"html_url":"https://github.com/Codebrahma/factory_group","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Codebrahma/factory_group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codebrahma%2Ffactory_group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codebrahma%2Ffactory_group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codebrahma%2Ffactory_group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codebrahma%2Ffactory_group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codebrahma","download_url":"https://codeload.github.com/Codebrahma/factory_group/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codebrahma%2Ffactory_group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274822761,"owners_count":25356580,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"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-12-04T23:08:19.923Z","updated_at":"2025-09-12T13:40:31.429Z","avatar_url":"https://github.com/Codebrahma.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FactoryGroup\n\n[![Gem Version](https://badge.fury.io/rb/factory_group.svg)](http://badge.fury.io/rb/factory_group)\n[![Build Status](https://travis-ci.org/Codebrahma/factory_group.svg?branch=master)](https://travis-ci.org/Codebrahma/factory_group)\n[![Code Climate](https://codeclimate.com/github/Codebrahma/factory_group/badges/gpa.svg)](https://codeclimate.com/github/Codebrahma/factory_group)\n[![Dependency Status](https://gemnasium.com/Codebrahma/factory_group.svg)](https://gemnasium.com/Codebrahma/factory_group)\n[![Test Coverage](https://codeclimate.com/github/Codebrahma/factory_group/badges/coverage.svg)](https://codeclimate.com/github/Codebrahma/factory_group)\n\nBy [CodeBrahma](http://codebrahma.com).\n\nFactoryGroup provides an abstraction on top of factory_girl, which will help you create reusable groups of factories which can be used across test cases.\n\nFor now we support only rails applications.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'factory_group', :group =\u003e :test\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install factory_group\n\n## Usage\n\nDefine a factory group\n\n```ruby\n# spec/factory_groups/user_group.rb\nFactoryGroup.define :user_group do\n  user FactoryGirl.create(:user, :name =\u003e \"Rajinikant\")\nend\n```\n\nNext require the factory_groups folder from the spec_helper\n\n```ruby\n# spec/spec_helper.rb\nDir[\"spec/factory_groups/**/*.rb\"].each { |f| require File.expand_path(f) }\n```\n\nNow from your spec call ```FactoryGroup.create(:user_group)```\n\n```ruby\n# spec/user_spec.rb\ndescribe User do\n  let(:user_group) { FactoryGroup.create(:user_group) }\n\n  context \"#name\" do\n    it \"returns Rajinikant\" do\n      expect(user_group.user.name).to eq \"Rajinikant\"\n    end\n  end\nend\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/factory_group/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebrahma%2Ffactory_group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebrahma%2Ffactory_group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebrahma%2Ffactory_group/lists"}