HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
thoughtbot
factory_bot
Ruby2012–2025
thoughtbot / factory_bot

factory_bot

A library for setting up Ruby objects as test data.

17Distinct people
17Mentions
0Explicit recommenders
8.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A library for setting up Ruby objects as test data.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year17 dated mentions

Observed mentions: 2012-09-06 01:22:02 UTC to 2025-05-04 04:12:37 UTC.

02462012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 7 mentions; 5 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC202
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC000
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC752
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC110
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

17 sources
ktmouk·Mar 30, 2024Submission

Show HN: Factory-JS – TypeScript dummy object generator for testing

I made Factory-js inspired by factory-bot (https://github.com/thoughtbot/factory_bot), supports Prisma and Drizzle ORM and more. TypeScript is now widely used in both backend and frontend, but there is no de facto standard factory library. I'm developing a web application using Prisma, trpc, and nextjs, but I was struggling with how to write more beautiful and readable back-end tests. That's why I made factory-js.
1 points · Open discussion
> if you're a bunch of tool makers and you all know your audience of tool users then there's no benefit at all to have someone offended by the word "tool" in your workforce. It kinda reminds me of the factorygirl -> factorybot [0] story. It was a cute enough name for a technical tool that plays nice among bros, and down the line you end up renaming your package and deal with the drama. On brand image, I get your point. I think the corporations doing it best tend to juggle with multiple brands and segment their market accordingly. Then yes, an homogeneous, single focus brand will be more valuable, as it also help to push people outside of the target to your other brands. [0] https://github.com/thoughtbot/factory_bot/wiki
In You can’t bribe, threaten, or feed people to get them back in the office
When releasing a new application (or feature) I've always loaded each table in my development environments database with a few million rows. Tools like Python's Factory Boy [1] or Ruby's Factory Bot [2] help get the data loaded. After the data is loaded up, start navigating through the application and it will become evident where improvements need to be made. Tools like Django Debug Toolbar [3] help expose where the bad ORM calls are or also by tailing Postgres log files. [1] https://github.com/FactoryBoy/factory_boy [2] https://github.com/thoughtbot/factory_bot [3] https://github.com/jazzband/django-debug-toolbar
In PostgreSQL query performance bottlenecks
> Why is it important for the sake of testing to be able to alter the runtime behaviour externally without changing the code? Because that's additional cruft that you don't want when reading your code. Yeah I get it, you can pass dozen of abstract classes to each constructor for each thing you are mocking (or equivalent if it's not a class-based language) that you replace if needed, the only problem with that is that it's inconvenient, prone to mistakes (you can forget some) and makes the code ugly (you don't want to read testing code on the main code). I've done it in multiple static languages and at best it's a workaround that you should not have to deal with. I should add that any additional barrier to writing tests like this one also reduces the likelyhood that your app is well tested since some developers of your team might not bothe
Read the rest
r going as far as that. > Spies are possible with e.g. the ReaderT pattern. After looking online, I'm not sure how that works, that does not looks very convenient for sure. Is that possible with that to say something like "the method X of class Y was executed 2 times with the parameters Z" without changing your code? > I don't know what this means. I looked at several articles describing some kind of factory pattern in TDD — all of which were horrifically verbose — and all I can glean from that is we are talking about mocking some function which generates objects. Something like https://github.com/thoughtbot/factory_bot > This is no different from mocking other system boundaries, which I have already addressed. Changing the time should also affect any sub dependency of your code which is calling to get the current time, not only your code.
In Drunk Post: Things I've Learned as a Sr Engineer
Similar things happen all the time [0] An interesting thinking angle to this often “why was it fine before ?” Was it because nobody knew about that name/word in the first place ? Was there always incoming requests for change but those were just ignored as baseless, and as the social context changed discarding them is not as easy anymore ? Was it because the majority of users weren’t offended, but the user base changed enough that offended people’s voices go louder ? I find a lot of seemingly frivolous or petty word changes have a wider context that are not as simple as it looks on the surface. [0] https://github.com/thoughtbot/factory_bot/issues/1053
In Linux 5.8 Formally Adds the Inclusive Terminology Guidelines
Name changes of popular OSS projects feels contentious, but like anything built on language it's inherently political and full of bias. As with anything, it's worth striving to improve things where we can. There are a few great examples including: 1. FactoryGirl -> FactoryBot: https://github.com/thoughtbot/factory_bot/issues/921 2. Whitelist -> Allowlist API in Rails: https://github.com/rails/rails/issues/33677 The irony that rather than engaging in the conversation and attempting to understand where people are coming from, bbatsov wrote a code of conduct then enforced it is not lost on me. > edited for formatting
In The RuboCop Name Drama Redux
This is neither good or bad imo. I can't even begin to comprehend why people would think that using a word in a fictional software name given by a developer causes "alienation". It's depressing that people take the time, effort and stress that goes into these rants and succeed. Possibly because those people are the only ones who care about something so.. worthless? useless? I mean, if people get murdered or locked up over this shit I could wrap my head around this edit: It seems a user on Github[0] called 'maxkwallace' addressed the naming issue. This particular user had an encounter with his female colleague which he found to be very awkward: "(...) at one point, I was going through some code with a female engineer, and noticing the name FactoryGirl led to an awkward exchange (...)" Later, he gets asked how the conversation was awkward
Read the rest
. He added: "(...) The woman I was working with didn't explicitly say that she felt uncomfortable (people almost never do), but my subjective impression was that she felt uncomfortable. I also felt uncomfortable." [0]: https://github.com/thoughtbot/factory_bot/issues/921
In FactoryGirl has been renamed FactoryBot

Showing the 15 most recent of 17 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.