Sha256: 22f9bd055646a63ae9c56ca6bf4cb53380daffe8beffb9c236e789e529812482

Contents?: true

Size: 654 Bytes

Versions: 1

Compression:

Stored size: 654 Bytes

Contents

# Namespace for the Fix framework.
#
# @api public
#
module Fix
  # Specs are built with this method.
  #
  # @example 42 must be equal to 42
  #   describe(42) do
  #     it { MUST equal 42 }
  #   end
  #
  # @param front_object [BasicObject] The front object.
  # @param options      [Hash]        Some options.
  # @param specs        [Proc]        The set of specs.
  #
  # @raise [SystemExit] The result of the test.
  def self.describe(front_object, options = {}, &specs)
    t = Test.new(front_object, options, &specs)

    print t.report.to_s if options.fetch(:verbose, true)
    exit t.pass?
  end
end

require_relative File.join 'fix', 'test'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fix-0.17.1 lib/fix.rb