File: unit.rb

package info (click to toggle)
ruby-minitest-around 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 172 kB
  • sloc: ruby: 282; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'minitest/test'

require 'minitest/around/version'

Minitest::Test.class_eval do
  alias_method :run_without_around, :run
  def run(*args)
    if defined?(around)
      result = nil
      around { result = run_without_around(*args) }
      result
    else
      run_without_around(*args)
    end
  end
end