Sha256: 06019aacddfc337303c64388f34f5f6e5f77517790eab03ba397836f4a21f6eb

Contents?: true

Size: 809 Bytes

Versions: 1

Compression:

Stored size: 809 Bytes

Contents

require 'matchi/rspec'
require 'fix/expect'
require 'fix/its'
require 'fix/let'

# Namespace for the R Spec framework.
#
# @api public
#
module RSpec
  # Specs are built with this method.
  #
  # @example The answer must be equal to 42.
  #   describe('the answer') do
  #     it { expect(42).to be 42 }
  #   end
  #
  # @param front_object [#object_id]  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 = ::Fix::Test.new(front_object, options, &specs)

    print "#{t.report}" if options.fetch(:verbose, true)
    exit t.pass?
  end
end

require_relative File.join 'fix', 'it'
require_relative File.join 'fix', 'on'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
r_spec-0.3.0 lib/r_spec.rb