Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
factory_girl is a fixtures replacement with a straightforward definition syntax, support for multiple build strategies (saved instances, unsaved instances, attribute hashes, and stubbed objects), and support for multiple factories for the same class (user, admin_user, and so on), including factory inheritance.
If you want to use factory_girl with Rails, see factory_girl_rails.
Interested in the project name?.
You should find the documentation for your version of factory_girl on Rubygems.
See GETTING_STARTED for information on defining and using factories. We also have a detailed introductory video, available for free on Upcase.
Add the following line to Gemfile:
gem 'factory_girl'
and run bundle install
from your shell.
To install the gem manually from your shell, run:
gem install factory_girl
Caveat: As of ActiveSupport 5.0 and above, Ruby 2.2.2+ is required. Because of Rubygems' dependency resolution when installing gems, you may see an error similar to:
$ gem install factory_girl
ERROR: Error installing factory_girl:
activesupport requires Ruby version >= 2.2.2.
To bypass this, install a pre-5.0 version of ActiveSupport before installing manually.
The factory_girl 3.x+ series supports MRI Ruby 1.9. Additionally, factory_girl 3.6+ supports JRuby 1.6.7.2+ while running in 1.9 mode. See GETTING_STARTED for more information on configuring the JRuby environment.
For versions of Ruby prior to 1.9, please use factory_girl 2.x.
Please see CONTRIBUTING.md.
factory_girl was originally written by Joe Ferris and is now maintained by Josh Clayton. Many improvements and bugfixes were contributed by the open source community.
factory_girl is Copyright © 2008-2017 Joe Ferris and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
factory_girl is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects or hire us to design, develop, and grow your product.
FAQs
Unknown package
We found that factory_girl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.