{"id":16977612,"url":"https://github.com/potatogopher/marigold","last_synced_at":"2026-05-02T10:43:53.088Z","repository":{"id":56882765,"uuid":"59415281","full_name":"potatogopher/marigold","owner":"potatogopher","description":null,"archived":false,"fork":false,"pushed_at":"2016-05-23T12:51:06.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-04T10:19:06.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/potatogopher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-22T14:01:15.000Z","updated_at":"2016-05-22T14:27:10.000Z","dependencies_parsed_at":"2022-08-21T00:20:12.383Z","dependency_job_id":null,"html_url":"https://github.com/potatogopher/marigold","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/potatogopher/marigold","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatogopher%2Fmarigold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatogopher%2Fmarigold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatogopher%2Fmarigold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatogopher%2Fmarigold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potatogopher","download_url":"https://codeload.github.com/potatogopher/marigold/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potatogopher%2Fmarigold/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261380464,"owners_count":23149934,"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-14T01:29:23.148Z","updated_at":"2026-05-02T10:43:53.041Z","avatar_url":"https://github.com/potatogopher.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Marigold\n[![Gem Version](https://badge.fury.io/rb/marigold.svg)](https://badge.fury.io/rb/marigold)\n\nMarigold is a script built for generating basic CRUD test for an API. Focus is on generating endpoint tests for Go. The test will be built out to support Ginkgo and Gomega. Marigold will support Javascript, Elixir, and Ruby in the future.\n\n## Installation\n```bash\ngem install marigold\n```\n\n## Generating test\nAssuming that you have some `*.go` files in your working directory, Marigold will loop through each one of the files and create a new file with the format `\u003cbase_name\u003e_test.go`. After generating test into each file, Marigold will call `go fmt` to format the Go code.\n\n```bash\n$ ls\nuser.go post.go\n\n$ marigold\n$ ls\nuser.go user_test.go post.go post_test.go\n```\n\n**user.go**\n```go\npackage main_test\n\nimport (\n\t\"bytes\"\n\t\"net/http\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"User\", func() {\n\tvar client = http.Client{}\n\n\tDescribe(\"POST /api/users\", func() {\n\t\tContext(\"with wrong user attributes\", func() {\n\t\t\tIt(\"responds with a 400\", func() {\n\t\t\t\treader := bytes.NewReader([]byte(`{\n\t\t\t\t\tTODO: JSON Object to POST with\n\t\t\t\t}`))\n\n\t\t\t\treq, err := http.NewRequest(\"POST\", _SERVER_+\"/api/users\", reader)\n\t\t\t\tExpect(err).To(BeNil())\n\n\t\t\t\tresp, err := client.Do(req)\n\t\t\t\tExpect(err).To(BeNil())\n\n\t\t\t\tExpect(resp.StatusCode).To(Equal(http.StatusBadRequest))\n\n\t\t\t})\n\t\t})\n\t\tContext(\"with correct user attributes\", func() {\n\t\t\tIt(\"responds with a 201\", func() {\n\t\t\t\treader := bytes.NewReader([]byte(`{\n\t\t\t\t\tTODO: JSON Object to POST with\n\t\t\t\t}`))\n\n\t\t\t\treq, err := http.NewRequest(\"POST\", _SERVER_+\"/api/users\", reader)\n\t\t\t\tExpect(err).To(BeNil())\n\n\t\t\t\tresp, err := client.Do(req)\n\t\t\t\tExpect(err).To(BeNil())\n\n\t\t\t\tExpect(resp.StatusCode).To(Equal(http.StatusCreated))\n\n\t\t\t})\n\t\t})\n\t})\n\n...\n```\n\nTo see entire example, check the examples directory\n\n## Support\nOrder of Completion\n- [x] Go (Ginkgo/Gomega)\n- [ ] Javascript\n- [ ] Elixir\n- [ ] Ruby\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotatogopher%2Fmarigold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotatogopher%2Fmarigold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotatogopher%2Fmarigold/lists"}