{"id":22981015,"url":"https://github.com/rubyworks/ae","last_synced_at":"2025-08-13T17:33:46.040Z","repository":{"id":642477,"uuid":"284418","full_name":"rubyworks/ae","owner":"rubyworks","description":"Assertive Expressive","archived":false,"fork":false,"pushed_at":"2020-06-23T20:54:30.000Z","size":1332,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-20T05:00:06.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/ae","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/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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":"2009-08-21T18:15:30.000Z","updated_at":"2020-06-23T20:54:33.000Z","dependencies_parsed_at":"2022-07-09T08:30:26.546Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/ae","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fae","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fae/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fae/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fae/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/ae/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229773540,"owners_count":18122031,"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-12-15T01:46:44.867Z","updated_at":"2024-12-15T01:46:45.316Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assertive Expressive\n\n[Website](http://rubyworks.github.com/ae) /\n[API](http://rubydoc.info/gems/ae) /\n[User Guide](http://wiki.github.com/rubyworks/ae) /\n[Report Issue](http://github.com/rubyworks/ae/issues) /\n[Source Code](http://github.com/rubyworks/ae)\n\n[![Gem Version](https://badge.fury.io/rb/ae.png)](http://badge.fury.io/rb/ae)\n[![Build Status](https://secure.travis-ci.org/rubyworks/ae.png)](http://travis-ci.org/rubyworks/ae) \u0026nbsp; \u0026nbsp;\n[![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)\n\n\n## About\n\nAssertive Expressive (AE) is an assertions framework\nintended for reuse by any TDD, BDD or similar system.\n\n\n## Features\n\n* Clear, simple and concise syntax.\n* Uses higher-order functions and fluid notation.\n* Reusable core extensions ease assertion construction.\n* Core extensions are standardized around Ruby Facets.\n* But Facets is not a dependency; the extensions are built-in.\n* Easily extensible allowing for alternate notations.\n* Eats it's own dog food.\n\n\n## Synopsis\n\nAE defines the method `assert`. It's is compatible with the method\nas defined by Test::Unit and MiniTest, which verifies truth of a\nsingle argument (and can accept an optional failure message).\n\n    assert(true)\n\nIn addition AE's `assert` method has been extended to accept a block,\nthe result of which is likewise verified.\n\n    assert{true}\n\nBut the real power the AE's +assert+ method lies in it's use\nwithout argument or block. In that case it returns an instance of\n`Assertor`. An `Assertor` is an *Assertions Functor*, or \n*Higher-Order Function*. It is a function that operates on\nanother function. With it, we can make assertions like so:\n\n    x.assert == y\n\n    a.assert.include? e\n\n    StandardError.assert.raised? do\n      ...\n    end\n\nAnd so forth. Any method can be used in conjunction with +assert+\nto make an assertion. Eg.\n\n    class String\n      def daffy?\n        /daffy/i =~ self\n      end\n    end\n\n    \"Daffy Duck\".assert.daffy?\n\nWhen an assertion fails an Assertion exception is raised. Any test\nframework can catch this exception and process it accordingly.\nTechnically the framework should check to see that the exception\nobject responds affirmatively to the #assertion? method. This way any\ntype of exception can be used as a means of assertion, not just AE's\nAssertion class.\n\nPlease have a look at the QED and API documentation to learn more.\n\n\n## Integration\n\nGenerally speaking, AE can be used with any test framework simply by putting\n`require 'ae'` in a test helper script. However to fully\nintegrate with a test framework and ensure the test framework recognizes\nAE assertions (as more than just exceptions) and to ensure assertion\ncounts are correct, a little extra interfacing code may be necessary.\n\nLucky for you AE has already done the leg work for the most common\ntest frameworks:\n\n    require 'ae/adapters/testunit'\n    require 'ae/adapters/minitest'\n    require 'ae/adapters/rspec'\n\n(Note that Cucumber does not need an adapter.)\n\nAE also includes a script that will automatically detect the current\ntest framework by checking for the existence of their respective \nnamespace modules.\n\n    require 'ae/adapter'\n\n\n## Nomenclature\n\nWith AE, defining assertions centers around the #assert method. So\n*assert* can be thought of as AE's primary _nomenclature_. However, variant\nnomenclatures have been popularized by other test frameworks, in particular\n*should* and *must*. If you prefer one of them terms, AE provides optional\nlibraries that can loaded for utilizing them.\n\n    require 'ae/should'\n    require 'ae/must'\n\nBy loading one of these scripts (or both) into your test system (e.g. via a test\nhelper script) you gain access to subjunctive terminology. See the API documentation\nfor the Subjunctive module for details.\n\n\n## Legacy\n\nTo ease transition from TestUnit style assertion methods, AE provides\na TestUnit legacy module.\n\n    require 'ae/legacy'\n\nThis provides a module `AE::Legacy::Assertions` which is included in AE::World\nand can be mixed into your test environment to provide old-school assertion\nmethods, e.g.\n\n    assert_equal(foo, bar, \"it failed\")\n\n\n## Installation\n\n### Gem Installs\n\nInstall AE in the usual fashion:\n\n    $ gem install ae\n\n### Site Installs\n\nLocal installation requires Setup.rb.\n\n    $ gem install setup\n\nThen download the tarball package from GitHub\nand do:\n\n    $ tar -xvzf ae-1.0.0.tgz\n    $ cd ae-1.0.0.tgz\n    $ sudo setup.rb all\n\nWindows users use 'ruby setup.rb all'.\n\n\n## Contributing\n\nIf you would like to contribute code to the AE project, for the upstream\nrepository and create a branch for you changes. When your changes are ready\nfor review (and no, they do not have to 100% perfect if you still have some issues\nyou need help working out).\n\nIt you need to personally discuss some ideas or issue you try to get up with us\nvia the mailing list or the IRC channel.\n\n* [Source Code](http://github.com/rubyworks/ae) /\n* [IRC Channel](irc://irc.freenode.net/rubyworks) /\n* [Mailing List](http://googlegroups.com/group/rubyworks-mailinglist)\n\n\n## Copyrights \u0026 License\n\nCopyright (c) 2008 Rubyworks. All rights reserved.\n\nUnless otherwise provided for by the originating author, this\nprogram is distributed under the terms of the *BSD-2-Clause* license.\nPortions of this program may be copyrighted by others.\n\nSee the NOTICE.rdoc file for details.\n\nAE is a [Rubyworks](http://rubyworks.github.com) project.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Fae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fae/lists"}