Socket
Book a DemoInstallSign in
Socket

orb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orb

0.1.5
bundlerRubygems
Version published
Maintainers
1
Created
Source

Orb

Orb is a magical tool for interactively building tests.

The gist: You insert orb! into your test file, then run your tests. When the runner gets to that line, it will open a REPL where you can interact with the environment and build up a test to be written back to the file.

Usage

The first step, after adding gem "orb" to your Gemfile, is to insert orb! in the class body of a TestCase, then run your tests. Once the repl appears, you will have access to the following commands, in addition to the functionality of a typical IRB (pry, really) prompt:

,a: Append the last line you ran in the REPL to the Buffer.

,p: Print the current contents of the Buffer.

,e: Edit the buffer in ENV['EDITOR'].

,r: Run the entire buffer again.

,n: Give a name to the current test. Called like ,n music is loud.

,w: Write the buffer back to the test file in place of the call to orb!.

Within the context of the REPL, assertions are evaluated immediately, rather than being deferred until later in the run. This lets you run assertions at the REPL and get meaningful results. nil indicates success; and error indicates and describes failure.

TODO

  • Screencast
  • MiniTest/RSpec support
  • Mocha/etc. integration -- assertions can't fire immediately.

License

MIT

FAQs

Package last updated on 16 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.