{"id":29955032,"url":"https://github.com/foca/love-nest","last_synced_at":"2025-09-15T07:20:29.332Z","repository":{"id":568085,"uuid":"199475","full_name":"foca/love-nest","owner":"foca","description":"Simple nested contexts for your tests","archived":false,"fork":false,"pushed_at":"2009-05-13T02:36:20.000Z","size":72,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T17:18:01.286Z","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/foca.png","metadata":{"files":{"readme":"README.rdoc","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-05-13T02:30:04.000Z","updated_at":"2016-01-03T08:46:53.000Z","dependencies_parsed_at":"2022-07-08T02:00:30.384Z","dependency_job_id":null,"html_url":"https://github.com/foca/love-nest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foca/love-nest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Flove-nest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Flove-nest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Flove-nest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Flove-nest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foca","download_url":"https://codeload.github.com/foca/love-nest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foca%2Flove-nest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275222590,"owners_count":25426513,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-03T17:09:18.384Z","updated_at":"2025-09-15T07:20:29.306Z","avatar_url":"https://github.com/foca.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Love Nest\n\nNested contexts for your Test::Unit test cases.\n\n== Example, please\n\n    require \"test/unit\"\n    require \"love_nest\"\n\n    class MyTestCase \u003c Test::Unit::TestCase\n      include LoveNest::TestCase\n\n      context \"A foo\" do\n        setup do\n          super\n          @foo = Foo.new\n        end\n\n        test \"is fooey\" do\n          assert @foo.fooey?\n        end\n      end\n\n      context \"A bar\" do\n        ...\n      end\n    end\n\n== Philosophy\n\nLoveNest wants you to be as explicit as possible when declaring your tests.\nIn order for it to work, you must include it explicitly into a class. You\ncan do the following if you want the methods available on all test cases:\n\n    class Test::Unit::TestCase\n      include LoveNest::TestCase\n    end\n\nAlso, when you declare \u003ctt\u003esetup\u003c/tt\u003e/\u003ctt\u003eteardown\u003c/tt\u003e blocks, you should\ncall \u003ctt\u003esuper\u003c/tt\u003e in order to call other setup/teardown blocks. \n\n    class MyTestCase \u003c Test::Unit::TestCase\n      setup do\n        super # call setup blocks on the parent class\n        @foo = Foo.new\n      end\n\n      context \"Some nesting, please\" do\n        setup do\n          super # first call the setup block on MyTestCase (and ancestors)\n          @bar = Bar.new\n        end\n\n        test \"foobar!\" do\n          ...\n        end\n      end\n    end\n\nWhy? Well, in 3 months someone else will read this test case and wonder why \na test fails, and then figure out it's because a setup block, defined on a \nglobally required test helper, was doing something bad. With an explicit call \nto \u003ctt\u003esuper\u003c/tt\u003e you get reminded that there are (or at least might be) other \nblocks of code running, which might introduce side effects to your test case.\n\n== Credits\n\nLoveNest was heavily influenced by \nContest[http://github.com/citrusbyte/contest].\n\nAuthor::  Nicolás Sanguinetti (aka foca[http://github.com/foca])\nLicense:: Code released under an MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoca%2Flove-nest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoca%2Flove-nest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoca%2Flove-nest/lists"}