module MRspec::Describe

Constants

MINITEST_REGEX

matches a call to a method that probably comes from minitest, in the disassembled bytecode

Public Class Methods

guess_which(&block) click to toggle source
# File lib/mrspec/describe.rb, line 45
def self.guess_which(&block)
  iseq = RubyVM::InstructionSequence.disasm(block)
  if iseq =~ MINITEST_REGEX
    :minitest
  else
    :rspec
  end
end