<commit_before># Be - Behaviorial Expectations

"Oh, Behave!"

[Website](http://rubyworks.github.com.be) /
[Report Issue](http://github.com/rubyworks/be/issues) /
[Source Code](http://github.com/rubyworks/be) /
[Mailing List](http://google.groups.com/groups/rubyworks-mailinglist)

[![Build Status](https://secure.travis-ci.org/rubyworks/be.png)](http://travis-ci.org/rubyworks/be)

<br/>

Be is a fully versitle, light-weight and BRASS compliant assertions framework
for Ruby. It utilizes an *assertor* design (*matchers* in RSpec terminology)
which meshes well with BDD nomenclatures.


## Instruction

Be's usage is very simple. It consits of using `#should` with a target object,
and passing it the reuslt of calling `#be` or `#have` with expectation critera.
Here is an example:

    require 'be'

    object = "string"

    object.should be.instance_of?(String)
    object.should have(6).size

The only difference betwee `#be` and `#have` is the default expectation method
that is used if none is provided. In the base of `#be` it is `#==`, for `#have` 
it is `#include?`.

    "abc".should be("abc")

    [:a,:b,:c].should have(:b)

Be works on the principle of *assertors*, a type of functor, or higher-order
function. In RSpec these are know as *matchers*. Be provides the method `#should`
for all Objects which accepts any object that converts to an assertor via a
`#to_assertor` method. The `#be` and `#have` method returns just that, a `Be::Delegator`<commit_msg>Minor tweak to README. [admin]<commit_after># Be - Behaviorial Expectations

"Oh, Behave!"

[Website](http://rubyworks.github.com.be) /
[Report Issue](http://github.com/rubyworks/be/issues) /
[Source Code](http://github.com/rubyworks/be) /
[Mailing List](http://google.groups.com/groups/rubyworks-mailinglist)

[![Build Status](https://secure.travis-ci.org/rubyworks/be.png)](http://travis-ci.org/rubyworks/be)

<br/>

<b>Be is a fully versitle, light-weight and BRASS compliant assertions framework
for Ruby. It utilizes an *assertor* design (*matchers* in RSpec terminology)
which meshes well with BDD nomenclatures.</b>

<br/>

## Instruction

Be's usage is very simple. It consits of using `#should` with a target object,
and passing it the reuslt of calling `#be` or `#have` with expectation critera.
Here is an example:

    require 'be'

    object = "string"

    object.should be.instance_of?(String)
    object.should have(6).size

The only difference betwee `#be` and `#have` is the default expectation method
that is used if none is provided. In the base of `#be` it is `#==`, for `#have` 
it is `#include?`.

    "abc".should be("abc")

    [:a,:b,:c].should have(:b)

Be works on the principle of *assertors*, a type of functor, or higher-order
function. In RSpec these are know as *matchers*. Be provides the method `#should`
for all Objects which accepts any object that converts to an assertor via a
`#to_assertor` method. The `#be` and `#have` method returns just that, a `Be::Delegator`
{'fraction_non_alphanumeric': 0.1325503355704698, 'fraction_numerical': 0.0006711409395973154, 'mean_word_length': 4.313725490196078, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949524', 'n_tokens_mistral': 999, 'n_tokens_neox': 952, 'n_words': 346}