pax_global_header 0000666 0000000 0000000 00000000064 15162567046 0014526 g ustar 00root root 0000000 0000000 52 comment=01bd69837c3182d6d15a06db2a8b70054a314bcc
rubyworks-brass-01bd698/ 0000775 0000000 0000000 00000000000 15162567046 0015244 5 ustar 00root root 0000000 0000000 rubyworks-brass-01bd698/.github/ 0000775 0000000 0000000 00000000000 15162567046 0016604 5 ustar 00root root 0000000 0000000 rubyworks-brass-01bd698/.github/workflows/ 0000775 0000000 0000000 00000000000 15162567046 0020641 5 ustar 00root root 0000000 0000000 rubyworks-brass-01bd698/.github/workflows/test.yml 0000664 0000000 0000000 00000000617 15162567046 0022347 0 ustar 00root root 0000000 0000000 name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.1', '3.2', '3.3', '3.4']
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake test
rubyworks-brass-01bd698/.gitignore 0000664 0000000 0000000 00000000045 15162567046 0017233 0 ustar 00root root 0000000 0000000 .yardoc
doc
log
pkg
tmp
Gemfile.lock
rubyworks-brass-01bd698/.yardopts 0000664 0000000 0000000 00000000110 15162567046 0017102 0 ustar 00root root 0000000 0000000 --title "BRASS"
--readme README.md
--protected
--private
lib
-
[A-Z]*.*
rubyworks-brass-01bd698/Gemfile 0000664 0000000 0000000 00000000047 15162567046 0016540 0 ustar 00root root 0000000 0000000 source "https://rubygems.org"
gemspec
rubyworks-brass-01bd698/LICENSE.txt 0000664 0000000 0000000 00000002336 15162567046 0017073 0 ustar 00root root 0000000 0000000 (BSD-2-Clause License)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
rubyworks-brass-01bd698/README.md 0000664 0000000 0000000 00000007226 15162567046 0016532 0 ustar 00root root 0000000 0000000 # BRASS
[Website](https://rubyworks.github.io/brass) |
[Report Issue](https://github.com/rubyworks/brass/issues) |
[Development](https://github.com/rubyworks/brass)
BRASS is a standard assertions framework, framework's framework, or even
a framework's framework's framework, depending on where you are staking
out your assertions keister. In other words, BRASS provides a foundational
assertions framework which all other assertion and test frameworks
can use, or at least comply with, and then everyone gets on swimmingly.
## Status
[](https://rubygems.org/gems/brass)
[](https://github.com/rubyworks/brass/actions/workflows/test.yml)
[](https://github.com/rubyworks/brass/issues)
## Overview
BRASS is a very basic assertions framework. It is designed to provide only
the barest essentials for making assertions such that other assertion and
test frameworks can use it, or at least comply with it, making all said
frameworks interoperable.
Now, you may be thinking, "No thanks, I do it my way." But when you see
how stupid simple BRASS is, you'll realize that, "Yea, that actually
make sense." And then maybe feel a bit stupid yourself for doing exactly
what this paragraph just said you would do. Yea, well, we've all been there.
But enough with the fluff.
BRASS defines two Kernel methods: `assert` and `refute`:
assert(truthiness, *fail_arguments)
refute(truthiness, *fail_arguments)
Where `truthiness` is any object evaluated for it's truth value (`false` and `nil`
are `false`, everything else is `true`), and `fail_arguments` are exactly the same
as those we would pass to the `fail` or `raise` methods.
The `assert` (and likewise `refute`) method does three things. First it tests the
`truthiness`, then it ticks up the appropriate counts in the global assertions
counter, and lastly, if truthiness came up short, it raises an error. This error
is either `RuntimeError` or the one specified by the `fail_arguments`.
The global assertions counter is `$ASSERTION_COUNTS`. It is simply a Hash formally
defined as:
$ASSERTION_COUNTS = Hash.new{|h,k| h[k] = 0}
And though it is open to any key, the keys should be symbols. Three keys in
particular and standard: `:pass`, `:fail` and `:total`. Whenever an assertion
passes, the `:pass` and `:total` counts are incremented, and whenever an assertion
fails the `:fail` and `:total` counts are incremented. You might wonder why
there is a total entry when the sum of the other two would do just as well.
Well, other frameworks might want to add other counts, such as `:skip`. So
to ensure we still get the proper total despite this, we keep a separate tally.
Moving on....
Okay, last thing. When `assert` or `refute` raises an error, it marks the error
as an assertion via the `#set_assertion` method. This is a method extension
to the Exception class along with the `#assertion?` method which any
test framework can use to distinguish an assertion error from an ordinarily
error.
And that's all there is to it. If you *capisce* then consider yourself top brass.
Love, Peace and Brass Knuckles
## Contributing
This project is so basic it is unlikely anything will even change. But you
never can tell! so if your have a brilliant idea, jump right in. Source
code management is handled by ye ol'Github at https://github.com/rubyworks/brass.
## Copyrights
Copyright (c) 2010 Rubyworks. All rights reserved.
Distribute in accordance with the **BSD-2-Clause** license.
See LICENSE.txt file for details.
rubyworks-brass-01bd698/Rakefile 0000664 0000000 0000000 00000000377 15162567046 0016720 0 ustar 00root root 0000000 0000000 require 'rubygems/package_task'
gemspec = Gem::Specification.load('brass.gemspec')
Gem::PackageTask.new(gemspec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end
desc "Run tests"
task :test do
ruby 'test/run.rb'
end
task :default => :test
rubyworks-brass-01bd698/VERSIONS.md 0000664 0000000 0000000 00000002505 15162567046 0017040 0 ustar 00root root 0000000 0000000 # HISTORY
## 1.3.0 | 2026-03-30
Maintenance release. Modernized project tooling and cleaned up documentation.
Changes:
* Replace custom Indexer system with standard gemspec.
* Replace Travis CI with GitHub Actions.
* Replace Assembly/detroit with Rakefile.
* Fix typos in README and source code.
* Update URLs to HTTPS.
* Remove obsolete files (etc/, work/, MANIFEST).
* Clean up .gitignore.
## 1.2.1 | 2012-02-09
This release adds framework adapters for MiniTest and TestUnit, which allows
those frameworks to recognize BRASS assertions as "failures" rather than
as "errors".
Changes:
* Add framework adapters for MiniTest and TestUnit.
## 1.2.0 | 2012-01-26
The default error is `RuntimeError` rather than `StandardError` to
match Ruby's default exception when no arguments are passed to `raise`.
Changes:
* Change default error to RuntimeError.
## 1.1.0 | 2012-01-25
Quick fix for issue with parsing arguments of #assert and #refute methods.
Also added #fail! method to dry-up code.
Changes:
* Fix arguments parsing for assert/refute.
* Add #fail! method to dry-up code.
## 1.0.0 | 2012-01-24
This is the initial release of BRASS. It is given a 1.0.0 version
despite being such a new project because it is very simple and
the code is derived from other system that have used it for some time.
Changes:
* Happy Birthday!
rubyworks-brass-01bd698/brass.gemspec 0000664 0000000 0000000 00000001564 15162567046 0017731 0 ustar 00root root 0000000 0000000 Gem::Specification.new do |s|
s.name = 'brass'
s.version = '1.3.0'
s.summary = 'Bare-metal Ruby Assertion System Standard'
s.description = 'BRASS stands for Bare-Metal Ruby Assertion System Standard. It is a very ' \
'basic foundational assertions framework for other assertion and test frameworks ' \
'to make use so they can all work together harmoniously.'
s.authors = ['Thomas Sawyer']
s.email = ['transfire@gmail.com']
s.homepage = 'https://github.com/rubyworks/brass'
s.license = 'BSD-2-Clause'
s.required_ruby_version = '>= 3.1'
s.files = Dir['lib/**/*', 'LICENSE.txt', 'README.md', 'VERSIONS.md']
s.require_paths = ['lib']
s.add_development_dependency 'rake', '>= 13'
s.add_development_dependency 'lemon', '>= 0.9'
s.add_development_dependency 'rubytest', '>= 0.8'
end
rubyworks-brass-01bd698/docs/ 0000775 0000000 0000000 00000000000 15162567046 0016174 5 ustar 00root root 0000000 0000000 rubyworks-brass-01bd698/docs/assets/ 0000775 0000000 0000000 00000000000 15162567046 0017476 5 ustar 00root root 0000000 0000000 rubyworks-brass-01bd698/docs/assets/badass.jpg 0000664 0000000 0000000 00000051637 15162567046 0021451 0 ustar 00root root 0000000 0000000 JFIF H H C
C
) J !1AQ"aq2#BR$br34CSc5Ust 7 !1AQa"2q#BR$3br ? Qpge@AB00@@@@@@@@@@@@@@@@@@@@@@@@@@@@@APՆvz3b3;xF6y!eT аBX!qn*"7oʣMؚ9Yiۚal^QBƬ$dF̭e-jɎXkQj4w act̐gvF,;+tR@@@@@AP(PQ[eIXfܐC:YZJkI]Y1D#h^#k3SC6RXZ~&/0wSOj2V"Kс4X%ZaLռ+l*0pal6S, *;{Jj$)V JhҚUɬ& /5]|^1oYȌ^cխkq龼Wnu v:0٩IQuȂ/].7%3B*a)"TQH1궢ɈjyUݘ >/2䱺H,nߑS79]X]rG"-<,Y+fB2"