artichoke-backend/vendor/mruby/test/assert.rb
##
# Create the assertion in a readable way
Create the assertion in a readable way
Create the assertion in a readable way
def assertion_string(err, str, iso=nil, e=nil, bt=nil)
  msg = "#{err}#{str}"
  msg += " [#{iso}]" if iso && !iso.empty?
  msg += " => #{e}" if e && !e.to_s.empty?
  if Object.const_defined?(:GEMNAME)
    msg += " (#{GEMNAME == 'mruby-test' ? 'core' : "mrbgems: #{GEMNAME}"})"
  end
  if $mrbtest_assert
    $mrbtest_assert.each do |idx, assert_msg, diff|
      msg += "\n - Assertion[#{idx}]"
      msg += " #{assert_msg}." if assert_msg && !assert_msg.empty?
      msg += "\n#{diff}" if diff && !diff.empty?
    end
  end
  msg += "\nbacktrace:\n        #{bt.join("\n        ")}" if bt && !bt.empty?
  msg
end
def assertion_string ( err , str , iso = nil , e = nil , bt = nil ) msg = "#{err}#{str}" msg += " [#{iso}]" if iso && ! iso . empty? msg += " => #{e}" if e && ! e . to_s . empty? if Object . const_defined? ( :GEMNAME ) msg += " (#{GEMNAME == 'mruby-test' ? 'core' : "mrbgems: #{GEMNAME}"})" end if $mrbtest_assert $mrbtest_assert . each do | idx , assert_msg , diff | msg += "\n - Assertion[#{idx}]" msg += " #{assert_msg}." if assert_msg && ! assert_msg . empty? msg += "\n#{diff}" if diff && ! diff . empty? end end msg += "\nbacktrace:\n        #{bt.join("\n        ")}" if bt && ! bt . empty? msg end
Create the assertion in a readable way
Create the assertion in a readable way
err
str
iso
e
bt