{"id":22980979,"url":"https://github.com/rubyworks/be","last_synced_at":"2025-04-02T09:42:02.629Z","repository":{"id":2591432,"uuid":"3573261","full_name":"rubyworks/be","owner":"rubyworks","description":"Behaviorial Expectations","archived":false,"fork":false,"pushed_at":"2012-12-22T00:49:14.000Z","size":148,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-08T12:47:45.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/be","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":"History.md","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-02-28T17:00:14.000Z","updated_at":"2013-01-08T01:02:20.000Z","dependencies_parsed_at":"2022-08-28T12:13:16.325Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/be","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fbe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/be/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246793012,"owners_count":20834921,"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:28.931Z","updated_at":"2025-04-02T09:42:02.609Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Be - Behaviorial Expectations\n\n\"Oh, Behave!\"\n\n[Website](http://rubyworks.github.com.be) /\n[Report Issue](http://github.com/rubyworks/be/issues) /\n[Source Code](http://github.com/rubyworks/be)\n( [![Build Status](https://secure.travis-ci.org/rubyworks/be.png)](http://travis-ci.org/rubyworks/be) )\n\n\u003cbr/\u003e\n\nBe is a versitle, light-weight and BRASS compliant assertions framework\nfor Ruby. It utilizes an *assertor* design (\u003ci\u003eknown as *matchers* in RSpec terminology\u003c/i\u003e)\nwhich meshes well with BDD nomenclature.\n\n## Instruction\n\nFirst you need to load the Be library into your test scope. There are two ways\nto do this. The first is the simplest and just entails loading `be`.\n\n    require 'be'\n\nThis loads the enitre library and includes `Be::World` into all scopes. The second\napproach provides more control over where the Be methods are added. To do this\neither require `be/should` or `be/expect` or both, and then include the\n`Be::World` module into the scope where the methods are to be available.\n\n    require 'be/expect'\n\n    module Cucumber::World\n      include Be::World\n    end\n\nAfter that it is simply a matter is using using `#should` or `#expect` with a target\nobject, and passing it the reuslt of calling `#be` or `#have` with testable critera.\n\n    object = \"string\"\n\n    object.should be.instance_of?(String)\n    object.should have(6).size\n\n    expect(object).to be.instance_of?(String)\n    expect(object).to have(6).size\n\nThe only difference between `#be` and `#have` is the default criteria method that is\nimplied if none is given. In the base of `#be` it is `#==`, for `#have` it is `#include?`.\n\n    \"abc\".should be(\"abc\")\n\n    [:a,:b,:c].should have(:b)\n\nBe works on the principle of *assertors*, a type of functor, or higher-order\nmessage. In RSpec these are know as *matchers*. Be provides the methods `#should`\nand `#expect` that handle any object that converts to an assertor via a\n`#to_assertor` method. The `#be` and `#have` method returns just that, a `Be::Delegator`\nwhich orgnaizes all calls made against it to use as expectations in the `Be::Assertor`.\n\n\n## Copyrights\n\nBe is copyrighted open source software.\n\n    Copyright (c) 2012 Rubyworks\n\nBe is distributable in accordance with the **BSD-2-Clause** license.\n\nSee **License.txt** for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fbe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Fbe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Fbe/lists"}