{"id":33178066,"url":"https://rubyworks.github.io/brass/","last_synced_at":"2025-11-20T21:01:15.784Z","repository":{"id":2302747,"uuid":"3261596","full_name":"rubyworks/brass","owner":"rubyworks","description":"Bare-Metal Ruby Assertions System Standard","archived":false,"fork":false,"pushed_at":"2014-07-20T01:12:10.000Z","size":304,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-10T23:35:57.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/brass","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-25T01:29:16.000Z","updated_at":"2014-08-28T14:57:04.000Z","dependencies_parsed_at":"2022-07-12T21:40:46.126Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/brass","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rubyworks/brass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbrass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbrass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbrass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbrass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/brass/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbrass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284825032,"owners_count":27069170,"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-11-17T02:00:06.431Z","response_time":55,"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-11-16T03:00:30.885Z","updated_at":"2025-11-20T21:01:15.779Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","readme":"# BRASS\n\n[Website](http://rubyworks.github.com/brass) |\n[Report Issue](http://github.com/rubyworks/brass/issues) |\n[Development](http://github.com/rubyworks/brass)\n\n\u003cb\u003eBRASS is a standard assertions framework, framework's framework, or even\na framework's framework's framework, depending on where you are staking\nout your assertions keister. In other words, BRASS provides a foundational\nassertions framework which all other assertion and test frameworks\ncan use, or at least comply with, and then everyone gets on swimingly.\u003c/b\u003e\n\n\n## Status\n\n[![Gem Version](http://img.shields.io/gem/v/brass.svg?style=flat)](http://rubygems.org/gem/brass)\n[![Build Status](http://img.shields.io/travis/rubyworks/brass.svg?style=flat)](http://travis-ci.org/rubyworks/brass)\n[![Fork Me](http://img.shields.io/badge/scm-github-blue.svg?style=flat)](http://github.com/rubyworks/brass)\n[![Report Issue](http://img.shields.io/github/issues/rubyworks/brass.svg?style=flat)](http://github.com/rubyworks/brass/issues)\n[![Gittip](http://img.shields.io/badge/gittip-$1/wk-green.svg?style=flat)](https://www.gittip.com/on/github/rubyworks/)\n\n\n## Overview\n\nBRASS is a very basic assertions framework. It is designed to provide only\nthe barest essentials for making assertions such that other assertion and\ntest frameworks can use it, or at least comply with it, making all said\nframeworks interoperable.\n\nNow, you may be thinking, \"No thanks, I do it my way.\" But when you see\nhow stupid simple BRASS is, you'll realize that, \"Yea, that actually \nmake sense.\" And then maybe feel a bit stupid yourself for doing exactly\nwhat this paragraph just said you would do. Yea, well, we've all been there.\n\nBut enough with the fluff.\n\nBRASS defines two Kernel methods: `assert` and `refute`:\n\n    assert(truthiness, *fail_arguments)\n    refute(truthiness, *fail_arguments)\n\nWhere `truthiness` is any object evaluated for it's truth value (`false` and `nil`\nare `false`, everything else is `true`), and `fail_arguments` are exactly the same\nas those we would pass to the `fail` or `raise` methods.\n\nThe `assert` (and likewise `refute`) method does three things. First it tests the\n`truthiness`, then it ticks up the appropriate counts in the global assertions\ncounter, and lastly, if truthiness came up short, it raises an error. This error\nis either `RuntimeError` or the one specified by the `fail_arguments`.\n\nThe global assertions counter is `$ASSERTION_COUNTS`. It is simply a Hash formally\ndefined as:\n\n    $ASSERTIONS_COUNTS = Hash.new{|h,k| h[k] = 0}\n\nAnd though it is open to any key, the keys should be symbols. Three keys in \nparticular and standard: `:pass`, `:fail` and `:total`. Whenever an assertion\npasses, the `:pass` and `:total` counts are incremented, and whenever an assertion\nfails the `:fail` and `:total` counts are incremented. You might wonder why\nthere is a total entry when the sum of the other two would do just as well. \nWell, other frameworks might want to add other counts, such as `:skip`. So\nto ensure we still get the proper total despite this, we keep a separate tally.\nMoving on....\n\nOkay, last thing. When `assert` or `refute` raises an error, it marks the error\nas an assertion via the `#set_assertion` method. This is a method extension\nto the Exception class along with the `#assertion?` method which any\ntest framework can use to distinguish an assertion error from an ordinarily\nerror.\n\nAnd that's all there is to it. If you *capice* then consider yourself top brass.\n\nLove, Peace and Brass Knuckles\n\n\n## Contributing\n\nThis project is so basic it is unlikely anything will even change. But you\nnever can tell! so if your have a brilliant idea, jump right in. Source\ncode management is handled by ye ol'Github at http://github.com/rubyworks/brass.\n\n\n## Copyrights\n\nCopyright (c) 2010 Rubyworks. All rights reserved.\n\nDistribute in accordance with the **BSD-2-Clause** license.\n\nSee LICENSE.txt file for details.\n","funding_links":[],"categories":["Testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/rubyworks.github.io%2Fbrass%2F","html_url":"https://awesome.ecosyste.ms/projects/rubyworks.github.io%2Fbrass%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/rubyworks.github.io%2Fbrass%2F/lists"}