{"id":16948620,"url":"https://github.com/technicalpickles/shoulda_generator","last_synced_at":"2025-09-28T13:30:41.248Z","repository":{"id":411430,"uuid":"30651","full_name":"technicalpickles/shoulda_generator","owner":"technicalpickles","description":"Rails generators which produce tests using shoulda instead of straight up Test::Unit. Other goodies as well.","archived":false,"fork":false,"pushed_at":"2009-01-06T23:20:40.000Z","size":147,"stargazers_count":59,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-11T15:59:09.543Z","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/technicalpickles.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-07-02T17:30:58.000Z","updated_at":"2022-11-28T16:00:15.000Z","dependencies_parsed_at":"2022-07-18T03:16:49.549Z","dependency_job_id":null,"html_url":"https://github.com/technicalpickles/shoulda_generator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fshoulda_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fshoulda_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fshoulda_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technicalpickles%2Fshoulda_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technicalpickles","download_url":"https://codeload.github.com/technicalpickles/shoulda_generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234517199,"owners_count":18845602,"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","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-10-13T21:51:41.012Z","updated_at":"2025-09-28T13:30:40.921Z","avatar_url":"https://github.com/technicalpickles.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shoulda generators\n\nOne night at a Boston Ruby hackfest, I finally got sick of using the Rails default generators, and then having to twiddle them to meet my needs and tastes. This includes using things like:\n\n * [shoulda](http://thoughtbot.com/projects/shoulda)\n * [factory\\_girl](http://github.com/thoughtbot/factory_girl)\n * [haml](http://haml.hamptoncatlin.com/)\n * [blueprint](http://code.google.com/p/blueprintcss/)\n\nThe next morning, I was struck awake at 5am with the inspiration to start implementing it. shoulda\\_generator is the result of this effort.\n\n## What you get\n\n### shoulda\\_model\n\n * A new model\n * A migration for the model\n  * Skip using --skip-migration\n * A factory defined with [factory_girl](http://github.com/thoughtbot/factory_girl)\n  * Skip using --skip-factory\n * A [shoulda](http://thoughtbot.com/projects/shoulda) unit test with a few simple 'should's\n\n#### Prereqs:\n\n * [shoulda](http://thoughtbot.com/projects/shoulda) installed as a plugin\n * [factory\\_girl](http://github.com/thoughtbot/factory_girl) gem installed\n * [factory\\_girl\\_on\\_rails](http://github.com/technicalpickles/factory_girl_on_rails) installed as a plugin\n\n### shoulda\\_scaffold\n\n * Everything included in shoulda_model\n * A controller (sans unnecessary comments)\n * Choice of [haml](http://haml.hamptoncatlin.com/) (default) or ERB \n   * Specify which with the --templating option\n * Simple layout styled with blueprint\n   * Skip using --skip-layout\n * A helper\n * A shoulda functional test using factory_girl factory, using should\\_be\\_restful or not\n   * Specify with --functional-test-style, accepts basic and should\\_be\\_restful\n\n#### Prereqs:\n\n * [shoulda](http://thoughtbot.com/projects/shoulda) installed as a plugin\n * [factory\\_girl](http://github.com/thoughtbot/factory_girl) gem installed\n * [factory\\_girl\\_on\\_rails](http://github.com/technicalpickles/factory_girl_on_rails) installed as a plugin\n * [haml](http://haml.hamptoncatlin.com/) gem installed on the system, and the project has been hamlified using  `haml --rails`\n\n## Getting it\n\nshoulda\\_generator is available as a gem via [GitHub](http://github.com). If you haven't done so already, you need to setup GitHub as a gem source:\n\n    $ gem sources -a http://gems.github.com\n    \nNow you can install it:\n    \n    $ sudo gem install technicalpickles-shoulda_generator\n\n## Example usage\n\nUsage is the same as the default Rails generators.\n\n    $ script/generate shoulda_model post title:string body:text published:boolean \n    $ script/generate shoulda_scaffold post title:string body:text published:boolean\n\n\n## Configuring it\n\nYou can override the default values for templating and functional\\_test\\_style by placing a .shoulda\\_generator  file in your home directory.\n\nHere's an example `.shoulda_generator`:\n\n    :templating: erb              # supported options: haml|erb\n    :functional_test_syle: basic  # supported options: should_be_restful|basic\n\n## Developing it\n\nSource is hosted on GitHub: [http://github.com/technicalpickles/shoulda_generator/tree/master](http://github.com/technicalpickles/shoulda_generator/tree/master)\n\nYou can do the usual fork/commit cycle until you have something ready to share. Send pull requests my way.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Fshoulda_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnicalpickles%2Fshoulda_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnicalpickles%2Fshoulda_generator/lists"}