File: minitest_extensions.rb

package info (click to toggle)
ruby-rantly 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 196 kB
  • sloc: ruby: 832; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'minitest'
require 'rantly/property'
require "minitest/unit" unless defined?(MiniTest)

test_class = if defined?(MiniTest::Test)
               MiniTest::Test
             else
               MiniTest::Unit::TestCase
             end

test_class.class_eval do
  def property_of(&blk)
    Rantly::Property.new(blk)
  end
end