File: around_test.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 (20 lines) | stat: -rw-r--r-- 343 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require_relative 'helper'
require 'minitest/around/unit'

class TestWithoutAround < Minitest::Test
  def test_no_around_defined
    assert true
  end
end

class TestWithoutArgs < Minitest::Test
  def around
    $before = true
    yield
    $before = false # hard to test?
  end

  def test_runs_around
    assert_equal true, $before
  end
end