Sha256: 400d9d5c6a2298307294cecdbb5026651e02e03d3332d7c1a4dcf859cef59c2c

Contents?: true

Size: 482 Bytes

Versions: 5

Compression:

Stored size: 482 Bytes

Contents

require 'minitest/autorun'
require 'minitest/spec'
require 'mocha/setup'

$LOAD_PATH << File.expand_path('../../lib', __FILE__)
require "minitest-chef-handler"

# Borrowed from MiniTest
def assert_triggered(expected)
  e = assert_raises(MiniTest::Assertion) do
    yield
  end
  msg = e.message.sub(/(---Backtrace---).*/m, '\1')
  msg.gsub!(/\(oid=[-0-9]+\)/, '(oid=N)')

  if expected.is_a?(String)
    assert_includes msg, expected
  else
    assert_match expected, msg
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
minitest-chef-handler-1.1.0 spec/spec_helper.rb
minitest-chef-handler-1.0.3 spec/spec_helper.rb
minitest-chef-handler-1.0.2 spec/spec_helper.rb
minitest-chef-handler-1.0.1 spec/spec_helper.rb
minitest-chef-handler-1.0.0 spec/spec_helper.rb