Socket
Book a DemoInstallSign in
Socket

citron

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

citron

0.4.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Citron

Website / Report Issue / IRC Channel / Mailing List / Development

Build Status

Description

Citron is a classical unit testing framework. It defines a simple domain language for creating traditionally modeled unit tests.

Installation

Using Rubygems simply install citron:

$ gem install citron

Citron depends on ansi for terminal colorization and rubytest, so those will be installed as well if they are not already.

Instruction

Citon tests are written as a collection of testcase and test blocks. Here is a fun example. We'll call the test file test/test_beatit.rb:

    TestCase "Show them how to Beat It" do

      setup do
        @funky = "funky"
        @right = "right"
      end

      # fail
      test "show them how to funky" do
        @funky.assert != "funky"
      end

      # pass
      test "show them what's right" do
        @right.assert == "right"
      end

      # error
      test "no one wants to be defeated" do
        raise SyntaxError
      end

      # todo
      test "better do what you can" do
        raise NotImplementedError
      end

    end

Citron doesn't dictate the assertions system you use. In the above example, we are using the A.E. assertion framework. You can use any BRASS compliant system you prefer.

Citron is built on top of RubyTest. Jump over to its website to learn how to run tests and setup test run profiles.

Copyrights

Copyright (c) 2011 Rubyworks

Citron is distributable according to the terms of the FreeBSD license.

See COPYING.md for details.

FAQs

Package last updated on 28 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.