Sha256: 65333609b026f60e64c49fc9197f383fce65db1e90fb705d3c2025613f0c151c

Contents?: true

Size: 409 Bytes

Versions: 2

Compression:

Stored size: 409 Bytes

Contents

# Provides painless, automatic configuration of DIFECTS.
#
# Simply require() this file and DIFECTS will be available for use anywhere
# in your program and will execute all tests before your program exits.

require 'difects'
include DIFECTS

at_exit do
  DIFECTS.start

  # reflect number of failures in exit status
  stats = DIFECTS.stats
  fails = stats[:fail] + stats[:error]

  exit [fails, 255].min
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
difects-3.0.1 lib/difects/auto.rb
difects-3.0.0 lib/difects/auto.rb