Sha256: c9f9360305dea68471c13c174c0b8ab6bc3eac4ea7dc3c787555999a469dfbb0

Contents?: true

Size: 590 Bytes

Versions: 5

Compression:

Stored size: 590 Bytes

Contents

require_relative File.join 'spectus', 'expectation_target'

# Namespace for the Spectus library.
#
# @api public
#
# @example 42 MUST be equal to 42
#   Spectus.this { 42 }.MUST Equal: 42 # => #<Spectus::Result::Pass...>
module Spectus
  # Expectations are built with this method.
  #
  # @api public
  #
  # @example Absolute requirement definition
  #   this { 42 }.MUST Equal: 42 # => #<Spectus::Result::Pass...>
  #
  # @param input [Proc] the code to test.
  #
  # @return [ExpectationTarget] the expectation target.
  def self.this(&input)
    ExpectationTarget.new(&input)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spectus-2.2.0 lib/spectus.rb
spectus-2.1.3 lib/spectus.rb
spectus-2.1.2 lib/spectus.rb
spectus-2.1.1 lib/spectus.rb
spectus-2.1.0 lib/spectus.rb