[openstreetmap/openstreetmap-website] Automatically generate factories instead of fixtures (PR #6625)
Pablo Brasero
notifications at github.com
Wed Dec 17 15:05:42 UTC 2025
@pablobm approved this pull request.
I can confirm this works, and makes a good argument to go for plural-named factory files as debated at https://github.com/openstreetmap/openstreetmap-website/pull/6607 (I'll get to that one).
With code as per `master`:
```
$ bin/rails g model doohicky
invoke active_record
create db/migrate/20251217150220_create_doohickies.rb
create app/models/doohicky.rb
invoke test_unit
create test/models/doohicky_test.rb
create test/fixtures/doohickies.yml
```
With code as per PR:
```
$ bin/rails g model doohicky
invoke active_record
create db/migrate/20251217150142_create_doohickies.rb
create app/models/doohicky.rb
invoke test_unit
create test/models/doohicky_test.rb
invoke factory_bot
create test/factories/doohickies.rb
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6625#pullrequestreview-3588185800
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6625/review/3588185800 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251217/649dd10f/attachment-0001.htm>
More information about the rails-dev
mailing list