{"id":13847009,"url":"https://github.com/FormulaMonks/contest","last_synced_at":"2025-07-12T08:31:08.853Z","repository":{"id":523702,"uuid":"152166","full_name":"FormulaMonks/contest","owner":"FormulaMonks","description":"Write more readable tests in Test::Unit with this tiny script.","archived":false,"fork":false,"pushed_at":"2016-09-05T22:41:34.000Z","size":131,"stargazers_count":141,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T07:49:33.741Z","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/FormulaMonks.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":"2009-03-16T18:05:09.000Z","updated_at":"2024-08-26T16:26:05.000Z","dependencies_parsed_at":"2022-07-07T22:04:49.404Z","dependency_job_id":null,"html_url":"https://github.com/FormulaMonks/contest","commit_stats":null,"previous_names":["citrusbyte/contest","formulamonks/contest","theoremone/contest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FormulaMonks/contest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormulaMonks%2Fcontest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormulaMonks%2Fcontest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormulaMonks%2Fcontest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormulaMonks%2Fcontest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FormulaMonks","download_url":"https://codeload.github.com/FormulaMonks/contest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormulaMonks%2Fcontest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264780414,"owners_count":23662645,"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-08-04T18:00:52.308Z","updated_at":"2025-07-12T08:31:08.548Z","avatar_url":"https://github.com/FormulaMonks.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"Contest\n=======\n\nContexts for Test::Unit.\n\nDescription\n-----------\n\nWrite declarative tests using nested contexts without performance penalties. Contest is less than 100 lines of code and gets the job done.\n\nUsage\n-----\n\nDeclare your tests as you would in RSpec or Shoulda:\n\n    require 'contest'\n\n    class SomeTest \u003c Test::Unit::TestCase\n      setup do\n        @value = 1\n      end\n\n      teardown do\n        @value = nil\n      end\n\n      test \"sample test\" do\n        assert_equal 1, @value\n      end\n\n      context \"a context\" do\n        setup do\n          @value += 1\n        end\n\n        test \"more tests\" do\n          assert_equal 2, @value\n        end\n\n        context \"a nested context\" do\n          setup do\n            @value += 1\n          end\n\n          test \"yet more tests\" do\n            assert_equal 3, @value\n          end\n        end\n      end\n    end\n\nFor your convenience, `context` is aliased as `describe` and `test` is aliased as `should`, so this is valid:\n\n    class SomeTest \u003c Test::Unit::TestCase\n      setup do\n        @value = 1\n      end\n\n      describe \"something\" do\n        setup do\n          @value += 1\n        end\n\n        should \"equal 2\" do\n          assert_equal 2, @value\n        end\n      end\n    end\n\nYou can run it normally, it's Test::Unit after all. If you want to run a particular test, say \"yet more tests\", try this:\n\n    $ testrb my_test.rb -n test_yet_more_tests\n\nOr with a regular expression:\n\n    $ testrb my_test.rb -n /yet_more_tests/\n\nInstallation\n------------\n\n    $ sudo gem install contest\n\nIf you want to use it with Rails, add this to config/environment.rb:\n\n    config.gem \"contest\"\n\nThen you can vendor the gem:\n\n    rake gems:install\n    rake gems:unpack\n\nLicense\n-------\n\nCopyright (c) 2009 Damian Janowski and Michel Martens for Citrusbyte\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n## About Citrusbyte\n\n![Citrusbyte](http://i.imgur.com/W6eISI3.png)\n\nContest is lovingly maintained and funded by Citrusbyte.\nAt Citrusbyte, we specialize in solving difficult computer science problems for startups and the enterprise.\n\nAt Citrusbyte we believe in and support open source software.\n* Check out more of our open source software at Citrusbyte Labs.\n* Learn more about [our work](https://citrusbyte.com/portfolio).\n* [Hire us](https://citrusbyte.com/contact) to work on your project.\n* [Want to join the team?](http://careers.citrusbyte.com)\n\n*Citrusbyte and the Citrusbyte logo are trademarks or registered trademarks of Citrusbyte, LLC.*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFormulaMonks%2Fcontest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFormulaMonks%2Fcontest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFormulaMonks%2Fcontest/lists"}