CINXE.COM
RubyGems - mocha - Versions diffs - 2.0.4 → 2.2.0 - Mend - Supply Chain Defender
<!DOCTYPE html> <html> <head> <title> RubyGems - mocha - Versions diffs - 2.0.4 → 2.2.0 - Mend - Supply Chain Defender </title> <link rel="icon" type="image/png" href="/packs/media/images/production/favicons/favicon-32x32-fa0286238d4d512e71dba3881cbbcc42.png" /> <link rel="mask-icon" type="image/x-icon" href="/packs/media/images/production/favicons/favicon-786db6a85c0dea068c1a7047338024d2.svg" /> <link rel="apple-touch-icon" type="image/png" href="/packs/media/images/production/favicons/apple-touch-icon-11491aa2351c88b3b48534d1576a2ff9.png" /> <link rel="shortcut icon" type="image/x-icon" href="/packs/media/images/production/favicons/favicon-81c62e5500c39bd10e99844e94455995.ico" /> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="V8mR2d6Unji-cnfZnkf-zO_bXWOJqCO7wJKqrsmszJ0TtHr9j1N0cWI4ejeszfBtGicU3fWcki5ujFv4S9Tj8w" /> <meta content='no-cache' name='turbolinks-cache-control'> <meta content='width=device-width, initial-scale=1' name='viewport'> <link rel="stylesheet" href="/packs/css/application-b44eb75784afb1e9f8ce.css" media="all" /> <script src="/packs/js/application-9f130b109122a7b55e22.js" data-turbolinks-track="reload"></script> <link href='https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i' rel='stylesheet'> </head> <body class='registries ruby_gems diffs' id='page-top'> <div id='wrapper'> <div class='d-flex flex-column' id='content-wrapper'> <div id='content'> <nav class='navbar navbar-expand navbar-light bg-white topbar mb-4 shadow'> <a class='sidebar-brand d-flex align-items-center justify-content-center' href='/'> <div class='sidebar-brand-text mx-3 d-none d-xxl-block d-xl-block'> <img alt="Diffend" src="/packs/media/images/production/logos/vertical-dark-5363ad390f9fcfd11bfecf89a3fb60f1.svg" /> </div> </a> <div class='container'> <ul class='navbar-nav'> <li class='nav-item'> <a class='nav-link' href='/gems'> <span class='mr-2 d-none d-lg-inline text-gray-600'> RubyGems </span> </a> </li> <li class='nav-item'> <a class='nav-link' href='/npm'> <span class='mr-2 d-none d-lg-inline text-gray-600'> npm </span> </a> </li> <div class='topbar-divider d-sm-block'></div> <li class='nav-item'> <a class='nav-link' href='/organizations'> <span class='mr-2 d-none d-lg-inline text-gray-600'> Organizations </span> </a> </li> </ul> <ul class='navbar-nav'> <div class='topbar-divider d-none d-sm-block'></div> <li class='nav-item'> <a class='nav-link' href='/users/sign_in'> <span class='mr-2 d-none d-lg-inline text-gray-600'> <i class='fas fa-key fa-fw mr-2'></i> Log in </span> </a> </li> <li class='nav-item'> <a class='nav-link' href='/users/sign_up'> <span class='mr-2 d-none d-lg-inline text-gray-600'> <i class='fas fa-user-plus fa-fw mr-2'></i> Sign up </span> </a> </li> </ul> </div> </nav> <div class='container'> <div class='row'> <div class='col mb-1'> <nav> <ol class='breadcrumb'> <li class='breadcrumb-item'> <a href="/gems">RubyGems</a> </li> <li class='breadcrumb-item'> <a href="/gems/mocha">mocha</a> </li> <li class='breadcrumb-item'> <a href="/gems/mocha">Versions diffs</a> </li> <li class='breadcrumb-item'> <a href="/gems/mocha/2.0.4/2.2.0">2.0.4 → 2.2.0</a> </li> </ol> </nav> </div> </div> <div class='row'> <div class='col'> <div class='text-right mb-4'> </div> </div> </div> <div class='row'> <div class='col align-items-center mb-4'> <div class='text-center'> <h2 class='text-gray-800'> mocha 2.0.4 → 2.2.0 </h2> </div> </div> </div> <div data-diff-id='5f01b419-d000-4b58-8a71-c45b314affd6' data-diff-state='finished' id='diff-id'> <div class='row'> <div class='col pt-2 text-black'> <div class='row'> <div class='col-lg-12 mb-4 mt-2'> <div class='card bg-info text-white shadow'> <div class='card-body'> <span class='icon text-white-100 mr-2'> <i class='fas fa-info-circle'></i> </span> Sign up to get <strong>free</strong> protection for your applications and to get access to all the features. </div> </div> </div> </div> <div id='diff'> <div class='mb-3'> <div class="d2h-file-list-wrapper"> <div class="d2h-file-list-header"> <span class="d2h-file-list-title">Files changed (29)</span> <a class="d2h-file-switch d2h-hide">hide</a> <a class="d2h-file-switch d2h-show">show</a> </div> <ol class="d2h-file-list"> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-683205" class="d2h-file-name">checksums.yaml</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+4</span> <span class="d2h-lines-deleted">-4</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-962357" class="d2h-file-name">data/.rubocop.yml</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+1</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-508509" class="d2h-file-name">data/.yardopts</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+1</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-485693" class="d2h-file-name">data/COPYING.md</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+1</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-027470" class="d2h-file-name">data/README.md</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+11</span> <span class="d2h-lines-deleted">-11</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-527805" class="d2h-file-name">data/RELEASE.md</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+33</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-485802" class="d2h-file-name">data/Rakefile</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+9</span> <span class="d2h-lines-deleted">-9</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-459192" class="d2h-file-name">data/lib/mocha/api.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+25</span> <span class="d2h-lines-deleted">-6</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-589755" class="d2h-file-name">data/lib/mocha/detection/{mini_test.rb → minitest.rb}</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+5</span> <span class="d2h-lines-deleted">-5</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-434629" class="d2h-file-name">data/lib/mocha/detection/test_unit.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+2</span> <span class="d2h-lines-deleted">-2</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-073382" class="d2h-file-name">data/lib/mocha/expectation.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+8</span> <span class="d2h-lines-deleted">-2</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-904210" class="d2h-file-name">data/lib/mocha/expectation_error_factory.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+2</span> <span class="d2h-lines-deleted">-2</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-755975" class="d2h-file-name">data/lib/mocha/expectation_list.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+7</span> <span class="d2h-lines-deleted">-3</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-557454" class="d2h-file-name">data/lib/mocha/hooks.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+10</span> <span class="d2h-lines-deleted">-4</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-495846" class="d2h-file-name">data/lib/mocha/integration/{mini_test → minitest}/adapter.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+21</span> <span class="d2h-lines-deleted">-6</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-450584" class="d2h-file-name">data/lib/mocha/integration/{mini_test → minitest}/exception_translation.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+2</span> <span class="d2h-lines-deleted">-2</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-534102" class="d2h-file-name">data/lib/mocha/integration/minitest.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+28</span> <span class="d2h-lines-deleted">-0</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-084852" class="d2h-file-name">data/lib/mocha/integration/test_unit/adapter.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+5</span> <span class="d2h-lines-deleted">-0</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-163311" class="d2h-file-name">data/lib/mocha/minitest.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+3</span> <span class="d2h-lines-deleted">-3</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-804784" class="d2h-file-name">data/lib/mocha/mock.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+16</span> <span class="d2h-lines-deleted">-10</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-849984" class="d2h-file-name">data/lib/mocha/mockery.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+8</span> <span class="d2h-lines-deleted">-4</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-653224" class="d2h-file-name">data/lib/mocha/object_methods.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+2</span> <span class="d2h-lines-deleted">-2</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-200953" class="d2h-file-name">data/lib/mocha/parameter_matchers/base.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+4</span> <span class="d2h-lines-deleted">-4</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-945855" class="d2h-file-name">data/lib/mocha/parameter_matchers/includes.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+3</span> <span class="d2h-lines-deleted">-3</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-588235" class="d2h-file-name">data/lib/mocha/parameter_matchers/responds_with.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+32</span> <span class="d2h-lines-deleted">-5</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-931638" class="d2h-file-name">data/lib/mocha/version.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+1</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-323343" class="d2h-file-name">data/mocha.gemspec</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+1</span> <span class="d2h-lines-deleted">-1</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-004177" class="d2h-file-name">metadata</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+7</span> <span class="d2h-lines-deleted">-7</span> </span> </span> </li> <li class="d2h-file-list-line"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1" viewBox="0 0 14 16" width="14"> <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path> </svg> <a href="/gems/mocha/2.0.4/2.2.0/page/1#d2h-452157" class="d2h-file-name">data/lib/mocha/integration/mini_test.rb</a> <span class="d2h-file-stats"> <span class="d2h-lines-added">+0</span> <span class="d2h-lines-deleted">-28</span> </span> </span> </li> </ol> </div> </div> <div id="d2h-683205" class="d2h-file-wrapper" data-lang="yaml"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-683205">checksums.yaml</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,7 +1,7 @@</div> </td> </tr><tr> <td id="d2h-683205-23" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-683205-23"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">---</span> </div> </td> </tr><tr> <td id="d2h-683205-34" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-683205-34"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">SHA256:</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">3</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> metadata.gz: <del>b9f9f9d3af38625fc3dd91c8a25b0cb23a340b8cd6b833bd4d46f45e3b8b6088</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> data.tar.gz: <del>d963f48e38f6251771314906d0582cc8ae49bd193636c48157f0c28e9c6c3152</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">3</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> metadata.gz: <ins>a37edfad5feabba14a5fe1b5c1d9d7a7f367f412c73a464dc2d20404ad42fea0</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> data.tar.gz: <ins>de9748735df4300f10a724b1eb6309f5262138ac3bc85bb0adbe6a9e64d09ec5</ins></span> </div> </td> </tr><tr> <td id="d2h-683205-89" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-683205-89"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">SHA512:</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">6</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> metadata.gz: <del>1ce4d70b024552f5dd37e7e9a5bb9920489de12eb129258d12d88f0ed7e445257b077262b98044153960545a9991d0aaa8a53fef9931bcf71bf6e11770044a73</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> data.tar.gz: <del>c49e3ce81fe12a12a647a6fcf9773ede2c0253a1016d9d2ab2255d4ce2b18102b5fe7d742f41bf303e39b51528760f19764adbaeab834ae2ef44d48865ba43ac</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">6</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> metadata.gz: <ins>b2b4635c867e2670144fe93b7b9f2822429fb3f9df7ad7242fb5242832cd775c392eb624dc45706fd5c4d55802a921381ce801bf1ccc3050c9ef912eb9641d07</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> data.tar.gz: <ins>56a349f9e87ab72e3e1a34d006c02bfef4afdffdc22991c9b1cd450f65d644203fdbc73a7559990eca6dea7a25dbc3765364c02ad86560b5968f7cb75a72e3ec</ins></span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-962357" class="d2h-file-wrapper" data-lang="yml"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-962357">data/.rubocop.yml</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,7 +1,7 @@</div> </td> </tr><tr> <td id="d2h-962357-171" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-962357-171"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">inherit_from: .rubocop_todo.yml</span> </div> </td> </tr><tr> <td id="d2h-962357-182" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-962357-182"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-962357-193" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-962357-193"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">AllCops:</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> TargetRubyVersion: 2.2 # closest to required_ruby_version of '>= 2.<del>0</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> TargetRubyVersion: 2.2 # closest to required_ruby_version of '>= 2.<ins>1</ins>'</span> </div> </td> </tr><tr> <td id="d2h-962357-226" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-962357-226"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-962357-237" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-962357-237"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># Even the reference in the documentation suggests that you should prefer</span> </div> </td> </tr><tr> <td id="d2h-962357-248" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-962357-248"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># `alias_method` vs `alias`, so I don't understand why that isn't the default.</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-508509" class="d2h-file-wrapper" data-lang="yardopts"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-508509">data/.yardopts</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -16,7 +16,7 @@ lib/mocha/expectation_error.rb</div> </td> </tr><tr> <td id="d2h-508509-286" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-508509-286"> <div class="line-num1">16</div> <div class="line-num2">16</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">lib/mocha/stubbing_error.rb</span> </div> </td> </tr><tr> <td id="d2h-508509-297" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-508509-297"> <div class="line-num1">17</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">lib/mocha/unexpected_invocation.rb</span> </div> </td> </tr><tr> <td id="d2h-508509-308" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-508509-308"> <div class="line-num1">18</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">lib/mocha/integration/test_unit/adapter.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">19</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">lib/mocha/integration/<del>mini_test</del>/adapter.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">19</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">lib/mocha/integration/<ins>minitest</ins>/adapter.rb</span> </div> </td> </tr><tr> <td id="d2h-508509-341" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-508509-341"> <div class="line-num1">20</div> <div class="line-num2">20</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">-</span> </div> </td> </tr><tr> <td id="d2h-508509-352" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-508509-352"> <div class="line-num1">21</div> <div class="line-num2">21</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">RELEASE.md</span> </div> </td> </tr><tr> <td id="d2h-508509-363" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-508509-363"> <div class="line-num1">22</div> <div class="line-num2">22</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">COPYING.md</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-485693" class="d2h-file-wrapper" data-lang="md"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-485693">data/COPYING.md</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,3 +1,3 @@</div> </td> </tr><tr> <td id="d2h-485693-401" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485693-401"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">Copyright James Mead 2006</span> </div> </td> </tr><tr> <td id="d2h-485693-412" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485693-412"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">3</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">You may use, copy and redistribute this library under the same terms as [Ruby itself](<del>http</del>://www.ruby-lang.org/en/<del>LICENSE</del>.txt) or under the [MIT license](<del>http</del>://<del>www</del>.<del>opensource.</del>org/<del>licenses/MIT</del>).</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">3</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">You may use, copy and redistribute this library under the same terms as [Ruby itself](<ins>https</ins>://www.ruby-lang.org/en/<ins>about/license</ins>.txt) or under the [MIT license](<ins>https</ins>://<ins>mit-license</ins>.org/).</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-027470" class="d2h-file-wrapper" data-lang="md"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-027470">data/README.md</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -4,7 +4,7 @@</div> </td> </tr><tr> <td id="d2h-027470-472" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-472"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-483" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-483"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">* A Ruby library for [mocking](http://xunitpatterns.com/Mock%20Object.html) and [stubbing](http://xunitpatterns.com/Test%20Stub.html) - but deliberately not (yet) [faking](http://xunitpatterns.com/Fake%20Object.html) or [spying](http://xunitpatterns.com/Test%20Spy.html).</span> </div> </td> </tr><tr> <td id="d2h-027470-494" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-494"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">* A unified, simple and readable syntax for both full & partial mocking.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">* Built-in support for <del>MiniTest</del> and Test::Unit.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Built-in support for <ins>Minitest</ins> and Test::Unit.</span> </div> </td> </tr><tr> <td id="d2h-027470-527" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-527"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">* Supported by many other test frameworks.</span> </div> </td> </tr><tr> <td id="d2h-027470-538" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-538"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-549" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-549"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">### Intended Usage</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -18,7 +18,7 @@ Install the latest version of the gem with the following command...</div> </td> </tr><tr> <td id="d2h-027470-566" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-566"> <div class="line-num1">18</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-577" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-577"> <div class="line-num1">19</div> <div class="line-num2">19</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> $ gem install mocha</span> </div> </td> </tr><tr> <td id="d2h-027470-588" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-588"> <div class="line-num1">20</div> <div class="line-num2">20</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">21</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">Note: If you are intending to use Mocha with Test::Unit or <del>MiniTest</del>, you should only setup Mocha *after* loading the relevant test library...</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">Note: If you are intending to use Mocha with Test::Unit or <ins>Minitest</ins>, you should only setup Mocha *after* loading the relevant test library...</span> </div> </td> </tr><tr> <td id="d2h-027470-621" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-621"> <div class="line-num1">22</div> <div class="line-num2">22</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-632" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-632"> <div class="line-num1">23</div> <div class="line-num2">23</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">##### Test::Unit</span> </div> </td> </tr><tr> <td id="d2h-027470-643" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-643"> <div class="line-num1">24</div> <div class="line-num2">24</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -29,12 +29,12 @@ require 'test/unit'</div> </td> </tr><tr> <td id="d2h-027470-660" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-660"> <div class="line-num1">29</div> <div class="line-num2">29</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/test_unit'</span> </div> </td> </tr><tr> <td id="d2h-027470-671" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-671"> <div class="line-num1">30</div> <div class="line-num2">30</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```</span> </div> </td> </tr><tr> <td id="d2h-027470-682" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-682"> <div class="line-num1">31</div> <div class="line-num2">31</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">32</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">##### <del>MiniTest</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">32</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">##### <ins>Minitest</ins></span> </div> </td> </tr><tr> <td id="d2h-027470-715" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-715"> <div class="line-num1">33</div> <div class="line-num2">33</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-726" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-726"> <div class="line-num1">34</div> <div class="line-num2">34</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```ruby</span> </div> </td> </tr><tr> <td id="d2h-027470-737" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-737"> <div class="line-num1">35</div> <div class="line-num2">35</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'rubygems'</span> </div> </td> </tr><tr> <td id="d2h-027470-748" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-748"> <div class="line-num1">36</div> <div class="line-num2">36</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">gem 'mocha'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">37</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">require 'minitest/<del>unit</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">37</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'minitest/<ins>autorun</ins>'</span> </div> </td> </tr><tr> <td id="d2h-027470-781" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-781"> <div class="line-num1">38</div> <div class="line-num2">38</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/minitest'</span> </div> </td> </tr><tr> <td id="d2h-027470-792" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-792"> <div class="line-num1">39</div> <div class="line-num2">39</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```</span> </div> </td> </tr><tr> <td id="d2h-027470-803" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-803"> <div class="line-num1">40</div> <div class="line-num2">40</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -53,14 +53,14 @@ require 'test/unit'</div> </td> </tr><tr> <td id="d2h-027470-820" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-820"> <div class="line-num1">53</div> <div class="line-num2">53</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/test_unit'</span> </div> </td> </tr><tr> <td id="d2h-027470-831" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-831"> <div class="line-num1">54</div> <div class="line-num2">54</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```</span> </div> </td> </tr><tr> <td id="d2h-027470-842" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-842"> <div class="line-num1">55</div> <div class="line-num2">55</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">56</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">##### <del>MiniTest</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">56</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">##### <ins>Minitest</ins></span> </div> </td> </tr><tr> <td id="d2h-027470-875" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-875"> <div class="line-num1">57</div> <div class="line-num2">57</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-886" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-886"> <div class="line-num1">58</div> <div class="line-num2">58</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```ruby</span> </div> </td> </tr><tr> <td id="d2h-027470-897" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-897"> <div class="line-num1">59</div> <div class="line-num2">59</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># Gemfile</span> </div> </td> </tr><tr> <td id="d2h-027470-908" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-908"> <div class="line-num1">60</div> <div class="line-num2">60</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">gem 'mocha'</span> </div> </td> </tr><tr> <td id="d2h-027470-919" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-919"> <div class="line-num1">61</div> <div class="line-num2">61</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-930" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-930"> <div class="line-num1">62</div> <div class="line-num2">62</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># Elsewhere after Bundler has loaded gems e.g. after `require 'bundler/setup'`</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">63</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">require 'minitest/<del>unit</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">63</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'minitest/<ins>autorun</ins>'</span> </div> </td> </tr><tr> <td id="d2h-027470-963" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-963"> <div class="line-num1">64</div> <div class="line-num2">64</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/minitest'</span> </div> </td> </tr><tr> <td id="d2h-027470-974" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-974"> <div class="line-num1">65</div> <div class="line-num2">65</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```</span> </div> </td> </tr><tr> <td id="d2h-027470-985" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-985"> <div class="line-num1">66</div> <div class="line-num2">66</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -103,9 +103,9 @@ end</div> </td> </tr><tr> <td id="d2h-027470-1002" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1002"> <div class="line-num1">103</div> <div class="line-num2">103</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-1013" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1013"> <div class="line-num1">104</div> <div class="line-num2">104</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">If you're loading Mocha using Bundler within a Rails application, you should setup Mocha manually e.g. at the bottom of your `test_helper.rb`.</span> </div> </td> </tr><tr> <td id="d2h-027470-1024" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1024"> <div class="line-num1">105</div> <div class="line-num2">105</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">106</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">##### <del>MiniTest</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">106</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">##### <ins>Minitest</ins></span> </div> </td> </tr><tr> <td id="d2h-027470-1057" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1057"> <div class="line-num1">107</div> <div class="line-num2">107</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">108</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">Note that since Rails v4 (at least), `ActiveSupport::TestCase` has inherited from `Minitest::Test` or its earlier equivalents. Thus unless you are *explicitly* using Test::Unit, you are likely to be using <del>MiniTest</del>.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">108</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">Note that since Rails v4 (at least), `ActiveSupport::TestCase` has inherited from `Minitest::Test` or its earlier equivalents. Thus unless you are *explicitly* using Test::Unit, you are likely to be using <ins>Minitest</ins>.</span> </div> </td> </tr><tr> <td id="d2h-027470-1090" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1090"> <div class="line-num1">109</div> <div class="line-num2">109</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-1101" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1101"> <div class="line-num1">110</div> <div class="line-num2">110</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">```ruby</span> </div> </td> </tr><tr> <td id="d2h-027470-1112" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1112"> <div class="line-num1">111</div> <div class="line-num2">111</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># Gemfile in Rails app</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -151,7 +151,7 @@ class MiscExampleTest < Test::Unit::TestCase</div> </td> </tr><tr> <td id="d2h-027470-1129" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1129"> <div class="line-num1">151</div> <div class="line-num2">151</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-027470-1140" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1140"> <div class="line-num1">152</div> <div class="line-num2">152</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-1151" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1151"> <div class="line-num1">153</div> <div class="line-num2">153</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def test_stubbing_instance_methods_on_real_objects</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">154</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> prices = [stub(:<del>pence</del> <del>=> </del>1000), stub(:<del>pence</del> <del>=> </del>2000)]</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">154</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> prices = [stub(<ins>pence</ins>: 1000), stub(<ins>pence</ins>: 2000)]</span> </div> </td> </tr><tr> <td id="d2h-027470-1184" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1184"> <div class="line-num1">155</div> <div class="line-num2">155</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> product = Product.new</span> </div> </td> </tr><tr> <td id="d2h-027470-1195" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1195"> <div class="line-num1">156</div> <div class="line-num2">156</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> product.stubs(:prices).returns(prices)</span> </div> </td> </tr><tr> <td id="d2h-027470-1206" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1206"> <div class="line-num1">157</div> <div class="line-num2">157</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> assert_equal [1000, 2000], product.prices.collect {|p| p.pence}</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -170,7 +170,7 @@ class MiscExampleTest < Test::Unit::TestCase</div> </td> </tr><tr> <td id="d2h-027470-1223" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1223"> <div class="line-num1">170</div> <div class="line-num2">170</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-027470-1234" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1234"> <div class="line-num1">171</div> <div class="line-num2">171</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-1245" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1245"> <div class="line-num1">172</div> <div class="line-num2">172</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def test_shortcuts</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">173</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> object = stub(:<del>method1</del> <del>=> </del>:result1, :<del>method2</del> <del>=> </del>:result2)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">173</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> object = stub(<ins>method1</ins>: :result1, <ins>method2</ins>: :result2)</span> </div> </td> </tr><tr> <td id="d2h-027470-1278" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1278"> <div class="line-num1">174</div> <div class="line-num2">174</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> assert_equal :result1, object.method1</span> </div> </td> </tr><tr> <td id="d2h-027470-1289" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1289"> <div class="line-num1">175</div> <div class="line-num2">175</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> assert_equal :result2, object.method2</span> </div> </td> </tr><tr> <td id="d2h-027470-1300" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1300"> <div class="line-num1">176</div> <div class="line-num2">176</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -364,4 +364,4 @@ Mocha was initially harvested from projects at [Reevoo](http://www.reevoo.com/).</div> </td> </tr><tr> <td id="d2h-027470-1317" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1317"> <div class="line-num1">364</div> <div class="line-num2">364</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-027470-1328" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1328"> <div class="line-num1">365</div> <div class="line-num2">365</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">&copy; Copyright James Mead 2006</span> </div> </td> </tr><tr> <td id="d2h-027470-1339" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-027470-1339"> <div class="line-num1">366</div> <div class="line-num2">366</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">367</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">You may use, copy and redistribute this library under the same terms as [Ruby itself](<del>http</del>://www.ruby-lang.org/en/<del>LICENSE</del>.txt) or under the [MIT license](<del>http</del>://<del>www</del>.<del>opensource.</del>org/<del>licenses/MIT</del>).</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">367</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">You may use, copy and redistribute this library under the same terms as [Ruby itself](<ins>https</ins>://www.ruby-lang.org/en/<ins>about/license</ins>.txt) or under the [MIT license](<ins>https</ins>://<ins>mit-license</ins>.org/).</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-527805" class="d2h-file-wrapper" data-lang="md"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-527805">data/RELEASE.md</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,10 +1,42 @@</div> </td> </tr><tr> <td id="d2h-527805-1399" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1399"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># Release Notes</span> </div> </td> </tr><tr> <td id="d2h-527805-1410" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1410"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1421" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1421"> <div class="line-num1"></div> <div class="line-num2">3</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">## 2.2.0</span> </div> </td> </tr><tr> <td id="d2h-527805-1432" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1432"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1443" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1443"> <div class="line-num1"></div> <div class="line-num2">5</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">### External changes</span> </div> </td> </tr><tr> <td id="d2h-527805-1454" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1454"> <div class="line-num1"></div> <div class="line-num2">6</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1465" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1465"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Support multiple methods in `responds_with` matcher (f086b7e4, #578) - thanks to @vlad-pisanov for the suggestion</span> </div> </td> </tr><tr> <td id="d2h-527805-1476" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1476"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Add block syntax for sequences (93fdffd, #61)</span> </div> </td> </tr><tr> <td id="d2h-527805-1487" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1487"> <div class="line-num1"></div> <div class="line-num2">9</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Improve sequence failure message (0800c6ff, #60)</span> </div> </td> </tr><tr> <td id="d2h-527805-1498" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1498"> <div class="line-num1"></div> <div class="line-num2">10</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Drop support for Ruby v2.0 (85848fb0, #642)</span> </div> </td> </tr><tr> <td id="d2h-527805-1509" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1509"> <div class="line-num1"></div> <div class="line-num2">11</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Include the original test name in expired stub error messages (ca3ff8eb, #641, #642) - thanks to @casperisfine</span> </div> </td> </tr><tr> <td id="d2h-527805-1520" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1520"> <div class="line-num1"></div> <div class="line-num2">12</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1531" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1531"> <div class="line-num1"></div> <div class="line-num2">13</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Avoid rubocop directive ending up in YARD docs (2a9ee81a)</span> </div> </td> </tr><tr> <td id="d2h-527805-1542" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1542"> <div class="line-num1"></div> <div class="line-num2">14</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Update docs to fix those for `Mock#method_missing` (cee0bad6)</span> </div> </td> </tr><tr> <td id="d2h-527805-1553" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1553"> <div class="line-num1"></div> <div class="line-num2">15</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Reinstate missing CNAME for GitHub Pages site (da67bb0d)</span> </div> </td> </tr><tr> <td id="d2h-527805-1564" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1564"> <div class="line-num1"></div> <div class="line-num2">16</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Use Ruby v1.9 Hash syntax in docs (6de20726, #625)</span> </div> </td> </tr><tr> <td id="d2h-527805-1575" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1575"> <div class="line-num1"></div> <div class="line-num2">17</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Add missing YARD tag for API#sequence name param (343c5979)</span> </div> </td> </tr><tr> <td id="d2h-527805-1586" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1586"> <div class="line-num1"></div> <div class="line-num2">18</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Add missing YARD tag for API#states name param (f798df83)</span> </div> </td> </tr><tr> <td id="d2h-527805-1597" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1597"> <div class="line-num1"></div> <div class="line-num2">19</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1608" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1608"> <div class="line-num1"></div> <div class="line-num2">20</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">### Internal changes</span> </div> </td> </tr><tr> <td id="d2h-527805-1619" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1619"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1630" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1630"> <div class="line-num1"></div> <div class="line-num2">22</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Tidy up Minitest vs MiniTest references (#626, #614, #615) - thanks to @zenspider & @Maimer for their help</span> </div> </td> </tr><tr> <td id="d2h-527805-1641" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1641"> <div class="line-num1"></div> <div class="line-num2">23</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Add Ruby v3.3 to CI build matrix (ce31b544)</span> </div> </td> </tr><tr> <td id="d2h-527805-1652" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1652"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1663" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1663"> <div class="line-num1"></div> <div class="line-num2">25</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">## 2.1.0</span> </div> </td> </tr><tr> <td id="d2h-527805-1674" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1674"> <div class="line-num1"></div> <div class="line-num2">26</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1685" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1685"> <div class="line-num1"></div> <div class="line-num2">27</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">### External changes</span> </div> </td> </tr><tr> <td id="d2h-527805-1696" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1696"> <div class="line-num1"></div> <div class="line-num2">28</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1707" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1707"> <div class="line-num1"></div> <div class="line-num2">29</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Fix compatibility with Minitest (#614) - thanks to @kyrofa & @manewitz for reporting and to @zenspider for his input</span> </div> </td> </tr><tr> <td id="d2h-527805-1718" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1718"> <div class="line-num1"></div> <div class="line-num2">30</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1729" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1729"> <div class="line-num1"></div> <div class="line-num2">31</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">### Internal changes</span> </div> </td> </tr><tr> <td id="d2h-527805-1740" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1740"> <div class="line-num1"></div> <div class="line-num2">32</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1751" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1751"> <div class="line-num1"></div> <div class="line-num2">33</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Update URLs for links to Ruby & MIT licenses (d6470af4)</span> </div> </td> </tr><tr> <td id="d2h-527805-1762" class="d2h-code-linenumber d2h-ins"><a href="#d2h-527805-1762"> <div class="line-num1"></div> <div class="line-num2">34</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1773" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1773"> <div class="line-num1">3</div> <div class="line-num2">35</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">## 2.0.4</span> </div> </td> </tr><tr> <td id="d2h-527805-1784" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1784"> <div class="line-num1">4</div> <div class="line-num2">36</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1795" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1795"> <div class="line-num1">5</div> <div class="line-num2">37</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">### Internal changes</span> </div> </td> </tr><tr> <td id="d2h-527805-1806" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1806"> <div class="line-num1">6</div> <div class="line-num2">38</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">* Update `README.md`</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">39</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">* Update `README.md`<ins> (e8c21e1b)</ins></span> </div> </td> </tr><tr> <td id="d2h-527805-1839" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1839"> <div class="line-num1">8</div> <div class="line-num2">40</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-527805-1850" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1850"> <div class="line-num1">9</div> <div class="line-num2">41</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">## 2.0.3</span> </div> </td> </tr><tr> <td id="d2h-527805-1861" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-527805-1861"> <div class="line-num1">10</div> <div class="line-num2">42</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-485802" class="d2h-file-wrapper" data-lang=""> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-485802">data/Rakefile</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -42,10 +42,10 @@ namespace 'test' do # rubocop:disable Metrics/BlockLength</div> </td> </tr><tr> <td id="d2h-485802-1899" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-1899"> <div class="line-num1">42</div> <div class="line-num2">42</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-485802-1910" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-1910"> <div class="line-num1">43</div> <div class="line-num2">43</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-485802-1921" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-1921"> <div class="line-num1">44</div> <div class="line-num2">44</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> namespace 'integration' do</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">45</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> desc 'Run <del>MiniTest</del> integration tests (intended to be run in its own process)'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">45</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> desc 'Run <ins>Minitest</ins> integration tests (intended to be run in its own process)'</span> </div> </td> </tr><tr> <td id="d2h-485802-1954" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-1954"> <div class="line-num1">46</div> <div class="line-num2">46</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> Rake::TestTask.new('minitest') do |t|</span> </div> </td> </tr><tr> <td id="d2h-485802-1965" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-1965"> <div class="line-num1">47</div> <div class="line-num2">47</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> t.libs << 'test'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">48</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> t.test_files = FileList['test/integration/<del>mini_test_test</del>.rb']</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">48</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> t.test_files = FileList['test/integration/<ins>minitest_test</ins>.rb']</span> </div> </td> </tr><tr> <td id="d2h-485802-1998" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-1998"> <div class="line-num1">49</div> <div class="line-num2">49</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> t.verbose = true</span> </div> </td> </tr><tr> <td id="d2h-485802-2009" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2009"> <div class="line-num1">50</div> <div class="line-num2">50</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> t.warning = true</span> </div> </td> </tr><tr> <td id="d2h-485802-2020" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2020"> <div class="line-num1">51</div> <div class="line-num2">51</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -93,18 +93,18 @@ end</div> </td> </tr><tr> <td id="d2h-485802-2037" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2037"> <div class="line-num1">93</div> <div class="line-num2">93</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"># rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity</span> </div> </td> </tr><tr> <td id="d2h-485802-2048" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2048"> <div class="line-num1">94</div> <div class="line-num2">94</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">def benchmark_test_case(klass, iterations)</span> </div> </td> </tr><tr> <td id="d2h-485802-2059" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2059"> <div class="line-num1">95</div> <div class="line-num2">95</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> require 'benchmark'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">96</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> require 'mocha/detection/<del>mini_test</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">96</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> require 'mocha/detection/<ins>minitest</ins>'</span> </div> </td> </tr><tr> <td id="d2h-485802-2092" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2092"> <div class="line-num1">97</div> <div class="line-num2">97</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">98</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> if defined?(<del>MiniTest</del>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">99</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> minitest_version = Gem::Version.new(Mocha::Detection::<del>MiniTest</del>.version)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">98</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> if defined?(<ins>Minitest</ins>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">99</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> minitest_version = Gem::Version.new(Mocha::Detection::<ins>Minitest</ins>.version)</span> </div> </td> </tr><tr> <td id="d2h-485802-2147" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2147"> <div class="line-num1">100</div> <div class="line-num2">100</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> if Gem::Requirement.new('>= 5.0.0').satisfied_by?(minitest_version)</span> </div> </td> </tr><tr> <td id="d2h-485802-2158" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2158"> <div class="line-num1">101</div> <div class="line-num2">101</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> Minitest.seed = 1</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">102</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> result = Benchmark.realtime { iterations.times { |_i| klass.run(<del>MiniTest</del>::CompositeReporter.new) } }</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">103</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>MiniTest</del>::Runnable.runnables.delete(klass)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">102</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> result = Benchmark.realtime { iterations.times { |_i| klass.run(<ins>Minitest</ins>::CompositeReporter.new) } }</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">103</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>Minitest</ins>::Runnable.runnables.delete(klass)</span> </div> </td> </tr><tr> <td id="d2h-485802-2213" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2213"> <div class="line-num1">104</div> <div class="line-num2">104</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> result</span> </div> </td> </tr><tr> <td id="d2h-485802-2224" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2224"> <div class="line-num1">105</div> <div class="line-num2">105</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> else</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">106</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>MiniTest</del>::Unit.output = StringIO.new</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">107</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Benchmark.realtime { iterations.times { |_i| <del>MiniTest</del>::Unit.new.run([klass]) } }</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">106</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>Minitest</ins>::Unit.output = StringIO.new</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">107</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Benchmark.realtime { iterations.times { |_i| <ins>Minitest</ins>::Unit.new.run([klass]) } }</span> </div> </td> </tr><tr> <td id="d2h-485802-2279" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2279"> <div class="line-num1">108</div> <div class="line-num2">108</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-485802-2290" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2290"> <div class="line-num1">109</div> <div class="line-num2">109</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> else</span> </div> </td> </tr><tr> <td id="d2h-485802-2301" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-485802-2301"> <div class="line-num1">110</div> <div class="line-num2">110</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> load 'test/unit/ui/console/testrunner.rb' unless defined?(Test::Unit::UI::Console::TestRunner)</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-459192" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-459192">data/lib/mocha/api.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -7,7 +7,7 @@ require 'mocha/object_methods'</div> </td> </tr><tr> <td id="d2h-459192-2339" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2339"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/class_methods'</span> </div> </td> </tr><tr> <td id="d2h-459192-2350" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2350"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-459192-2361" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2361"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">10</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # Methods added to +Test::Unit::TestCase+, +<del>MiniTest</del>::Unit::TestCase+ or equivalent.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">10</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Methods added to +Test::Unit::TestCase+, +<ins>Minitest</ins>::Unit::TestCase+ or equivalent.</span> </div> </td> </tr><tr> <td id="d2h-459192-2394" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2394"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # The mock creation methods are {#mock}, {#stub} and {#stub_everything}, all of which return a #{Mock}</span> </div> </td> </tr><tr> <td id="d2h-459192-2405" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2405"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # which can be further modified by {Mock#responds_like} and {Mock#responds_like_instance_of} methods,</span> </div> </td> </tr><tr> <td id="d2h-459192-2416" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2416"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # both of which return a {Mock}, too, and can therefore, be chained to the original creation methods.</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -60,7 +60,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-459192-2433" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2433"> <div class="line-num1">60</div> <div class="line-num2">60</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2444" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2444"> <div class="line-num1">61</div> <div class="line-num2">61</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Using expected_methods_vs_return_values Hash to setup expectations.</span> </div> </td> </tr><tr> <td id="d2h-459192-2455" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2455"> <div class="line-num1">62</div> <div class="line-num2">62</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # def test_motor_starts_and_stops</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">63</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # motor = mock('motor', :<del>start</del> <del>=> </del>true, :<del>stop</del> <del>=> </del>true)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">63</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # motor = mock('motor', <ins>start</ins>: true, <ins>stop</ins>: true)</span> </div> </td> </tr><tr> <td id="d2h-459192-2488" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2488"> <div class="line-num1">64</div> <div class="line-num2">64</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert motor.start</span> </div> </td> </tr><tr> <td id="d2h-459192-2499" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2499"> <div class="line-num1">65</div> <div class="line-num2">65</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert motor.stop</span> </div> </td> </tr><tr> <td id="d2h-459192-2510" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2510"> <div class="line-num1">66</div> <div class="line-num2">66</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # an error will be raised unless both Motor#start and Motor#stop have been called</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -88,7 +88,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-459192-2527" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2527"> <div class="line-num1">88</div> <div class="line-num2">88</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2538" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2538"> <div class="line-num1">89</div> <div class="line-num2">89</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Using stubbed_methods_vs_return_values Hash to setup stubbed methods.</span> </div> </td> </tr><tr> <td id="d2h-459192-2549" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2549"> <div class="line-num1">90</div> <div class="line-num2">90</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # def test_motor_starts_and_stops</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">91</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # motor = stub('motor', :<del>start</del> <del>=> </del>true, :<del>stop</del> <del>=> </del>true)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">91</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # motor = stub('motor', <ins>start</ins>: true, <ins>stop</ins>: true)</span> </div> </td> </tr><tr> <td id="d2h-459192-2582" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2582"> <div class="line-num1">92</div> <div class="line-num2">92</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert motor.start</span> </div> </td> </tr><tr> <td id="d2h-459192-2593" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2593"> <div class="line-num1">93</div> <div class="line-num2">93</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert motor.stop</span> </div> </td> </tr><tr> <td id="d2h-459192-2604" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2604"> <div class="line-num1">94</div> <div class="line-num2">94</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # an error will not be raised even if either Motor#start or Motor#stop has not been called</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -115,7 +115,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-459192-2621" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2621"> <div class="line-num1">115</div> <div class="line-num2">115</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2632" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2632"> <div class="line-num1">116</div> <div class="line-num2">116</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Ignore invocations of irrelevant methods.</span> </div> </td> </tr><tr> <td id="d2h-459192-2643" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2643"> <div class="line-num1">117</div> <div class="line-num2">117</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # def test_motor_stops</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">118</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # motor = stub_everything('motor', :<del>stop</del> <del>=> </del>true)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">118</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # motor = stub_everything('motor', <ins>stop</ins>: true)</span> </div> </td> </tr><tr> <td id="d2h-459192-2676" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2676"> <div class="line-num1">119</div> <div class="line-num2">119</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert_nil motor.irrelevant_method_1 # => no error raised</span> </div> </td> </tr><tr> <td id="d2h-459192-2687" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2687"> <div class="line-num1">120</div> <div class="line-num2">120</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert_nil motor.irrelevant_method_2 # => no error raised</span> </div> </td> </tr><tr> <td id="d2h-459192-2698" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2698"> <div class="line-num1">121</div> <div class="line-num2">121</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # assert motor.stop</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -131,8 +131,11 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-459192-2715" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2715"> <div class="line-num1">131</div> <div class="line-num2">131</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-459192-2726" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2726"> <div class="line-num1">132</div> <div class="line-num2">132</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # Builds a new sequence which can be used to constrain the order in which expectations can occur.</span> </div> </td> </tr><tr> <td id="d2h-459192-2737" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2737"> <div class="line-num1">133</div> <div class="line-num2">133</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">134</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # Specify that an expected invocation must occur within a named {Sequence} by <del>using</del> {Expectation#in_sequence}<del>.</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">134</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Specify that an expected invocation must occur within a named {Sequence} by <ins>calling</ins> {Expectation#in_sequence}</span> </div> </td> </tr><tr> <td id="d2h-459192-2770" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2770"> <div class="line-num1"></div> <div class="line-num2">135</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # on each expectation or by passing a block within which all expectations should be constrained by the {Sequence}.</span> </div> </td> </tr><tr> <td id="d2h-459192-2781" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2781"> <div class="line-num1">135</div> <div class="line-num2">136</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2792" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2792"> <div class="line-num1"></div> <div class="line-num2">137</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @param [String] name name of sequence</span> </div> </td> </tr><tr> <td id="d2h-459192-2803" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2803"> <div class="line-num1"></div> <div class="line-num2">138</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @yield optional block within which expectations should be constrained by the sequence</span> </div> </td> </tr><tr> <td id="d2h-459192-2814" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2814"> <div class="line-num1">136</div> <div class="line-num2">139</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @return [Sequence] a new sequence</span> </div> </td> </tr><tr> <td id="d2h-459192-2825" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2825"> <div class="line-num1">137</div> <div class="line-num2">140</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2836" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2836"> <div class="line-num1">138</div> <div class="line-num2">141</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @see Expectation#in_sequence</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -156,8 +159,23 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-459192-2853" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2853"> <div class="line-num1">156</div> <div class="line-num2">159</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2864" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2864"> <div class="line-num1">157</div> <div class="line-num2">160</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # task_one.execute</span> </div> </td> </tr><tr> <td id="d2h-459192-2875" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2875"> <div class="line-num1">158</div> <div class="line-num2">161</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # task_two.execute</span> </div> </td> </tr><tr> <td id="d2h-459192-2886" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2886"> <div class="line-num1"></div> <div class="line-num2">162</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-2897" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2897"> <div class="line-num1"></div> <div class="line-num2">163</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @example Ensure methods on egg are invoked in the correct order using a block.</span> </div> </td> </tr><tr> <td id="d2h-459192-2908" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2908"> <div class="line-num1"></div> <div class="line-num2">164</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # egg = mock('egg')</span> </div> </td> </tr><tr> <td id="d2h-459192-2919" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2919"> <div class="line-num1"></div> <div class="line-num2">165</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # sequence('breakfast') do</span> </div> </td> </tr><tr> <td id="d2h-459192-2930" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2930"> <div class="line-num1"></div> <div class="line-num2">166</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # egg.expects(:crack)</span> </div> </td> </tr><tr> <td id="d2h-459192-2941" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2941"> <div class="line-num1"></div> <div class="line-num2">167</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # egg.expects(:fry)</span> </div> </td> </tr><tr> <td id="d2h-459192-2952" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2952"> <div class="line-num1"></div> <div class="line-num2">168</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # egg.expects(:eat)</span> </div> </td> </tr><tr> <td id="d2h-459192-2963" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-2963"> <div class="line-num1"></div> <div class="line-num2">169</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # end</span> </div> </td> </tr><tr> <td id="d2h-459192-2974" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-2974"> <div class="line-num1">159</div> <div class="line-num2">170</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def sequence(name)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">160</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Sequence.new(name)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">171</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Sequence.new(name)<ins>.tap do |seq|</ins></span> </div> </td> </tr><tr> <td id="d2h-459192-3007" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3007"> <div class="line-num1"></div> <div class="line-num2">172</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Mockery.instance.sequences.push(seq)</span> </div> </td> </tr><tr> <td id="d2h-459192-3018" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3018"> <div class="line-num1"></div> <div class="line-num2">173</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> begin</span> </div> </td> </tr><tr> <td id="d2h-459192-3029" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3029"> <div class="line-num1"></div> <div class="line-num2">174</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> yield if block_given?</span> </div> </td> </tr><tr> <td id="d2h-459192-3040" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3040"> <div class="line-num1"></div> <div class="line-num2">175</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> ensure</span> </div> </td> </tr><tr> <td id="d2h-459192-3051" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3051"> <div class="line-num1"></div> <div class="line-num2">176</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Mockery.instance.sequences.pop</span> </div> </td> </tr><tr> <td id="d2h-459192-3062" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3062"> <div class="line-num1"></div> <div class="line-num2">177</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-459192-3073" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3073"> <div class="line-num1"></div> <div class="line-num2">178</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-459192-3084" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3084"> <div class="line-num1">161</div> <div class="line-num2">179</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-459192-3095" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3095"> <div class="line-num1">162</div> <div class="line-num2">180</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-459192-3106" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3106"> <div class="line-num1">163</div> <div class="line-num2">181</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # Builds a new state machine which can be used to constrain the order in which expectations can occur.</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -170,6 +188,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-459192-3123" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3123"> <div class="line-num1">170</div> <div class="line-num2">188</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-3134" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3134"> <div class="line-num1">171</div> <div class="line-num2">189</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # A test can contain multiple state machines.</span> </div> </td> </tr><tr> <td id="d2h-459192-3145" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3145"> <div class="line-num1">172</div> <div class="line-num2">190</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-3156" class="d2h-code-linenumber d2h-ins"><a href="#d2h-459192-3156"> <div class="line-num1"></div> <div class="line-num2">191</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @param [String] name name of state machine</span> </div> </td> </tr><tr> <td id="d2h-459192-3167" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3167"> <div class="line-num1">173</div> <div class="line-num2">192</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @return [StateMachine] a new state machine</span> </div> </td> </tr><tr> <td id="d2h-459192-3178" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3178"> <div class="line-num1">174</div> <div class="line-num2">193</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-459192-3189" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-459192-3189"> <div class="line-num1">175</div> <div class="line-num2">194</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @see Expectation#then</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-589755" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-589755">data/lib/mocha/detection/{mini_test.rb → minitest.rb}</a></span> <span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,17 +1,17 @@</div> </td> </tr><tr> <td id="d2h-589755-3227" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3227"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td id="d2h-589755-3238" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3238"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module Detection</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">3</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> module <del>MiniTest</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">3</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> module <ins>Minitest</ins></span> </div> </td> </tr><tr> <td id="d2h-589755-3271" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3271"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def self.testcase</span> </div> </td> </tr><tr> <td id="d2h-589755-3282" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3282"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> if defined?(::Minitest::Test)</span> </div> </td> </tr><tr> <td id="d2h-589755-3293" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3293"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ::Minitest::Test</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> elsif defined?(::<del>MiniTest</del>::Unit::TestCase)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">8</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> ::<del>MiniTest</del>::Unit::TestCase</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> elsif defined?(::<ins>Minitest</ins>::Unit::TestCase)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> ::<ins>Minitest</ins>::Unit::TestCase</span> </div> </td> </tr><tr> <td id="d2h-589755-3348" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3348"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-589755-3359" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3359"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-589755-3370" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3370"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-589755-3381" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3381"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def self.version</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">13</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> if defined?(::<del>MiniTest</del>::Unit::VERSION)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">14</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> ::<del>MiniTest</del>::Unit::VERSION</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">13</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> if defined?(::<ins>Minitest</ins>::Unit::VERSION)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">14</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> ::<ins>Minitest</ins>::Unit::VERSION</span> </div> </td> </tr><tr> <td id="d2h-589755-3436" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3436"> <div class="line-num1">15</div> <div class="line-num2">15</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> elsif defined?(::Minitest::VERSION)</span> </div> </td> </tr><tr> <td id="d2h-589755-3447" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3447"> <div class="line-num1">16</div> <div class="line-num2">16</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ::Minitest::VERSION</span> </div> </td> </tr><tr> <td id="d2h-589755-3458" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-589755-3458"> <div class="line-num1">17</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> else</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-434629" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-434629">data/lib/mocha/detection/test_unit.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -3,8 +3,8 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-434629-3496" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-434629-3496"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module TestUnit</span> </div> </td> </tr><tr> <td id="d2h-434629-3507" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-434629-3507"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def self.testcase</span> </div> </td> </tr><tr> <td id="d2h-434629-3518" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-434629-3518"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> if defined?(::Test::Unit::TestCase) &&</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">6</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> !(defined?(::<del>MiniTest</del>::Unit::TestCase) && (::Test::Unit::TestCase < ::<del>MiniTest</del>::Unit::TestCase)) &&</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> !(defined?(::<del>MiniTest</del>::Spec) && (::Test::Unit::TestCase < ::<del>MiniTest</del>::Spec))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">6</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> !(defined?(::<ins>Minitest</ins>::Unit::TestCase) && (::Test::Unit::TestCase < ::<ins>Minitest</ins>::Unit::TestCase)) &&</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> !(defined?(::<ins>Minitest</ins>::Spec) && (::Test::Unit::TestCase < ::<ins>Minitest</ins>::Spec))</span> </div> </td> </tr><tr> <td id="d2h-434629-3573" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-434629-3573"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ::Test::Unit::TestCase</span> </div> </td> </tr><tr> <td id="d2h-434629-3584" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-434629-3584"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-434629-3595" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-434629-3595"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-073382" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-073382">data/lib/mocha/expectation.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -632,14 +632,20 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-073382-3633" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3633"> <div class="line-num1">632</div> <div class="line-num2">632</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @ordering_constraints.all?(&:allows_invocation_now?)</span> </div> </td> </tr><tr> <td id="d2h-073382-3644" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3644"> <div class="line-num1">633</div> <div class="line-num2">633</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-073382-3655" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3655"> <div class="line-num1">634</div> <div class="line-num2">634</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-073382-3666" class="d2h-code-linenumber d2h-ins"><a href="#d2h-073382-3666"> <div class="line-num1"></div> <div class="line-num2">635</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-073382-3677" class="d2h-code-linenumber d2h-ins"><a href="#d2h-073382-3677"> <div class="line-num1"></div> <div class="line-num2">636</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def ordering_constraints_not_allowing_invocation_now</span> </div> </td> </tr><tr> <td id="d2h-073382-3688" class="d2h-code-linenumber d2h-ins"><a href="#d2h-073382-3688"> <div class="line-num1"></div> <div class="line-num2">637</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> @ordering_constraints.reject(&:allows_invocation_now?)</span> </div> </td> </tr><tr> <td id="d2h-073382-3699" class="d2h-code-linenumber d2h-ins"><a href="#d2h-073382-3699"> <div class="line-num1"></div> <div class="line-num2">638</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-073382-3710" class="d2h-code-linenumber d2h-ins"><a href="#d2h-073382-3710"> <div class="line-num1"></div> <div class="line-num2">639</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-073382-3721" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3721"> <div class="line-num1">635</div> <div class="line-num2">640</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-073382-3732" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3732"> <div class="line-num1">636</div> <div class="line-num2">641</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def matches_method?(method_name)</span> </div> </td> </tr><tr> <td id="d2h-073382-3743" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3743"> <div class="line-num1">637</div> <div class="line-num2">642</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @method_matcher.match?(method_name)</span> </div> </td> </tr><tr> <td id="d2h-073382-3754" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3754"> <div class="line-num1">638</div> <div class="line-num2">643</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-073382-3765" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3765"> <div class="line-num1">639</div> <div class="line-num2">644</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-073382-3776" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3776"> <div class="line-num1">640</div> <div class="line-num2">645</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">641</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def match?(invocation)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">642</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> @method_matcher.match?(invocation.method_name) && @parameters_matcher.match?(invocation.arguments) && @block_matcher.match?(invocation.block)<del> && in_correct_order?</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">646</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def match?(invocation<ins>, ignoring_order: false</ins>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">647</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>order_independent_match = </ins>@method_matcher.match?(invocation.method_name) && @parameters_matcher.match?(invocation.arguments) && @block_matcher.match?(invocation.block)</span> </div> </td> </tr><tr> <td id="d2h-073382-3831" class="d2h-code-linenumber d2h-ins"><a href="#d2h-073382-3831"> <div class="line-num1"></div> <div class="line-num2">648</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> ignoring_order ? order_independent_match : order_independent_match && in_correct_order?</span> </div> </td> </tr><tr> <td id="d2h-073382-3842" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3842"> <div class="line-num1">643</div> <div class="line-num2">649</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-073382-3853" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3853"> <div class="line-num1">644</div> <div class="line-num2">650</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-073382-3864" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-073382-3864"> <div class="line-num1">645</div> <div class="line-num2">651</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-904210" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-904210">data/lib/mocha/expectation_error_factory.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -6,9 +6,9 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-904210-3902" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-3902"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-904210-3913" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-3913"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # This class should only be used by authors of test libraries and not by typical "users" of Mocha.</span> </div> </td> </tr><tr> <td id="d2h-904210-3924" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-3924"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">9</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # For example, it is used by +Mocha::Integration::<del>MiniTest</del>::Adapter+ in order to have Mocha raise a +<del>MiniTest</del>::Assertion+ which can then be sensibly handled by +<del>MiniTest</del>::Unit::TestCase+.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">9</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # For example, it is used by +Mocha::Integration::<ins>Minitest</ins>::Adapter+ in order to have Mocha raise a +<ins>Minitest</ins>::Assertion+ which can then be sensibly handled by +<ins>Minitest</ins>::Unit::TestCase+.</span> </div> </td> </tr><tr> <td id="d2h-904210-3957" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-3957"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">11</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # @see Mocha::Integration::<del>MiniTest</del>::Adapter</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">11</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @see Mocha::Integration::<ins>Minitest</ins>::Adapter</span> </div> </td> </tr><tr> <td id="d2h-904210-3990" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-3990"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> class ExpectationErrorFactory</span> </div> </td> </tr><tr> <td id="d2h-904210-4001" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-4001"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> class << self</span> </div> </td> </tr><tr> <td id="d2h-904210-4012" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-904210-4012"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @!attribute exception_class</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-755975" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-755975">data/lib/mocha/expectation_list.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -17,7 +17,11 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-755975-4050" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4050"> <div class="line-num1">17</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @expectations.any? { |expectation| expectation.matches_method?(method_name) }</span> </div> </td> </tr><tr> <td id="d2h-755975-4061" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4061"> <div class="line-num1">18</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-755975-4072" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4072"> <div class="line-num1">19</div> <div class="line-num2">19</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">20</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def match(invocation)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">20</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def match(invocation<ins>, ignoring_order: false</ins>)</span> </div> </td> </tr><tr> <td id="d2h-755975-4105" class="d2h-code-linenumber d2h-ins"><a href="#d2h-755975-4105"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> matching_expectations(invocation, ignoring_order: ignoring_order).first</span> </div> </td> </tr><tr> <td id="d2h-755975-4116" class="d2h-code-linenumber d2h-ins"><a href="#d2h-755975-4116"> <div class="line-num1"></div> <div class="line-num2">22</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-755975-4127" class="d2h-code-linenumber d2h-ins"><a href="#d2h-755975-4127"> <div class="line-num1"></div> <div class="line-num2">23</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-755975-4138" class="d2h-code-linenumber d2h-ins"><a href="#d2h-755975-4138"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def match_but_out_of_order(invocation)</span> </div> </td> </tr><tr> <td id="d2h-755975-4149" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4149"> <div class="line-num1">21</div> <div class="line-num2">25</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> matching_expectations(invocation).first</span> </div> </td> </tr><tr> <td id="d2h-755975-4160" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4160"> <div class="line-num1">22</div> <div class="line-num2">26</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-755975-4171" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4171"> <div class="line-num1">23</div> <div class="line-num2">27</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -51,8 +55,8 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-755975-4188" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4188"> <div class="line-num1">51</div> <div class="line-num2">55</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-755975-4199" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4199"> <div class="line-num1">52</div> <div class="line-num2">56</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> private</span> </div> </td> </tr><tr> <td id="d2h-755975-4210" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4210"> <div class="line-num1">53</div> <div class="line-num2">57</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">54</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def matching_expectations(invocation)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">55</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> @expectations.select { |e| e.match?(invocation) }</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">58</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def matching_expectations(invocation<ins>, ignoring_order: false</ins>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">59</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> @expectations.select { |e| e.match?(invocation<ins>, ignoring_order: ignoring_order</ins>) }</span> </div> </td> </tr><tr> <td id="d2h-755975-4265" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4265"> <div class="line-num1">56</div> <div class="line-num2">60</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-755975-4276" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4276"> <div class="line-num1">57</div> <div class="line-num2">61</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-755975-4287" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-755975-4287"> <div class="line-num1">58</div> <div class="line-num2">62</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-557454" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-557454">data/lib/mocha/hooks.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -7,12 +7,12 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-557454-4325" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4325"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-557454-4336" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4336"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # This module is provided as part of the +Mocha::API+ module and is therefore part of the public API, but should only be used by authors of test libraries and not by typical "users" of Mocha.</span> </div> </td> </tr><tr> <td id="d2h-557454-4347" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4347"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">10</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # Integration with Test::Unit and <del>MiniTest</del> are provided as part of Mocha, because they are (or were once) part of the Ruby standard library. Integration with other test libraries is not provided as *part* of Mocha, but is supported by means of the methods in this module.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">10</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Integration with Test::Unit and <ins>Minitest</ins> are provided as part of Mocha, because they are (or were once) part of the Ruby standard library. Integration with other test libraries is not provided as *part* of Mocha, but is supported by means of the methods in this module.</span> </div> </td> </tr><tr> <td id="d2h-557454-4380" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4380"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-557454-4391" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4391"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # See the code in the +Adapter+ modules for examples of how to use the methods in this module. +Mocha::ExpectationErrorFactory+ may be used if you want +Mocha+ to raise a different type of exception.</span> </div> </td> </tr><tr> <td id="d2h-557454-4402" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4402"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-557454-4413" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4413"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @see Mocha::Integration::TestUnit::Adapter</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">15</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # @see Mocha::Integration::<del>MiniTest</del>::Adapter</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">15</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @see Mocha::Integration::<ins>Minitest</ins>::Adapter</span> </div> </td> </tr><tr> <td id="d2h-557454-4446" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4446"> <div class="line-num1">16</div> <div class="line-num2">16</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @see Mocha::ExpectationErrorFactory</span> </div> </td> </tr><tr> <td id="d2h-557454-4457" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4457"> <div class="line-num1">17</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @see Mocha::API</span> </div> </td> </tr><tr> <td id="d2h-557454-4468" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4468"> <div class="line-num1">18</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module Hooks</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -35,8 +35,14 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-557454-4485" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4485"> <div class="line-num1">35</div> <div class="line-num2">35</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # Resets Mocha after a test (only for use by authors of test libraries).</span> </div> </td> </tr><tr> <td id="d2h-557454-4496" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4496"> <div class="line-num1">36</div> <div class="line-num2">36</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-557454-4507" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4507"> <div class="line-num1">37</div> <div class="line-num2">37</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # This method should be called after each individual test has finished (including after any "teardown" code).</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">38</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def mocha_teardown</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">39</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Mockery.teardown</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">38</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def mocha_teardown<ins>(origin = mocha_test_name)</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">39</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Mockery.teardown<ins>(origin)</ins></span> </div> </td> </tr><tr> <td id="d2h-557454-4562" class="d2h-code-linenumber d2h-ins"><a href="#d2h-557454-4562"> <div class="line-num1"></div> <div class="line-num2">40</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-557454-4573" class="d2h-code-linenumber d2h-ins"><a href="#d2h-557454-4573"> <div class="line-num1"></div> <div class="line-num2">41</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-557454-4584" class="d2h-code-linenumber d2h-ins"><a href="#d2h-557454-4584"> <div class="line-num1"></div> <div class="line-num2">42</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Returns a string representing the unit test name, to be included in some Mocha</span> </div> </td> </tr><tr> <td id="d2h-557454-4595" class="d2h-code-linenumber d2h-ins"><a href="#d2h-557454-4595"> <div class="line-num1"></div> <div class="line-num2">43</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # to help track down potential bugs.</span> </div> </td> </tr><tr> <td id="d2h-557454-4606" class="d2h-code-linenumber d2h-ins"><a href="#d2h-557454-4606"> <div class="line-num1"></div> <div class="line-num2">44</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def mocha_test_name</span> </div> </td> </tr><tr> <td id="d2h-557454-4617" class="d2h-code-linenumber d2h-ins"><a href="#d2h-557454-4617"> <div class="line-num1"></div> <div class="line-num2">45</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> nil</span> </div> </td> </tr><tr> <td id="d2h-557454-4628" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4628"> <div class="line-num1">40</div> <div class="line-num2">46</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-557454-4639" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4639"> <div class="line-num1">41</div> <div class="line-num2">47</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-557454-4650" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-557454-4650"> <div class="line-num1">42</div> <div class="line-num2">48</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-495846" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-495846">data/lib/mocha/integration/{mini_test → minitest}/adapter.rb</a></span> <span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -4,26 +4,26 @@ require 'mocha/expectation_error_factory'</div> </td> </tr><tr> <td id="d2h-495846-4688" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4688"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-4699" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4699"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td id="d2h-495846-4710" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4710"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module Integration</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> module <del>MiniTest</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">8</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # Integrates Mocha into recent versions of <del>MiniTest</del>.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> module <ins>Minitest</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Integrates Mocha into recent versions of <ins>Minitest</ins>.</span> </div> </td> </tr><tr> <td id="d2h-495846-4765" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4765"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-495846-4776" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4776"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # See the source code for an example of how to integrate Mocha into a test library.</span> </div> </td> </tr><tr> <td id="d2h-495846-4787" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4787"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module Adapter</span> </div> </td> </tr><tr> <td id="d2h-495846-4798" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4798"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> include Mocha::API</span> </div> </td> </tr><tr> <td id="d2h-495846-4809" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4809"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-4820" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4820"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">15</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def self.applicable_to?(<del>mini_test_version</del>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">16</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Gem::Requirement.new('>= 3.3.0').satisfied_by?(<del>mini_test_version</del>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">15</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def self.applicable_to?(<ins>minitest_version</ins>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">16</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Gem::Requirement.new('>= 3.3.0').satisfied_by?(<ins>minitest_version</ins>)</span> </div> </td> </tr><tr> <td id="d2h-495846-4875" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4875"> <div class="line-num1">17</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-4886" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4886"> <div class="line-num1">18</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-4897" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4897"> <div class="line-num1">19</div> <div class="line-num2">19</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-495846-4908" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4908"> <div class="line-num1">20</div> <div class="line-num2">20</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def self.description</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">21</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> 'adapter for <del>MiniTest</del> gem >= v3.3.0'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> 'adapter for <ins>Minitest</ins> gem >= v3.3.0'</span> </div> </td> </tr><tr> <td id="d2h-495846-4941" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4941"> <div class="line-num1">22</div> <div class="line-num2">22</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-4952" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4952"> <div class="line-num1">23</div> <div class="line-num2">23</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-4963" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4963"> <div class="line-num1">24</div> <div class="line-num2">24</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-495846-4974" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-4974"> <div class="line-num1">25</div> <div class="line-num2">25</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def self.included(_mod)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">26</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Mocha::ExpectationErrorFactory.exception_class = ::<del>MiniTest</del>::Assertion</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">26</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Mocha::ExpectationErrorFactory.exception_class = ::<ins>Minitest</ins>::Assertion</span> </div> </td> </tr><tr> <td id="d2h-495846-5007" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5007"> <div class="line-num1">27</div> <div class="line-num2">27</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5018" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5018"> <div class="line-num1">28</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-5029" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5029"> <div class="line-num1">29</div> <div class="line-num2">29</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -46,6 +46,21 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-495846-5046" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5046"> <div class="line-num1">46</div> <div class="line-num2">46</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> super</span> </div> </td> </tr><tr> <td id="d2h-495846-5057" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5057"> <div class="line-num1">47</div> <div class="line-num2">47</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> mocha_teardown</span> </div> </td> </tr><tr> <td id="d2h-495846-5068" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5068"> <div class="line-num1">48</div> <div class="line-num2">48</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5079" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5079"> <div class="line-num1"></div> <div class="line-num2">49</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-5090" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5090"> <div class="line-num1"></div> <div class="line-num2">50</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-495846-5101" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5101"> <div class="line-num1"></div> <div class="line-num2">51</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def mocha_test_name</span> </div> </td> </tr><tr> <td id="d2h-495846-5112" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5112"> <div class="line-num1"></div> <div class="line-num2">52</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> if respond_to?(:name)</span> </div> </td> </tr><tr> <td id="d2h-495846-5123" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5123"> <div class="line-num1"></div> <div class="line-num2">53</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> test_name = name</span> </div> </td> </tr><tr> <td id="d2h-495846-5134" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5134"> <div class="line-num1"></div> <div class="line-num2">54</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> elsif respond_to?(:__name__) # Older minitest</span> </div> </td> </tr><tr> <td id="d2h-495846-5145" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5145"> <div class="line-num1"></div> <div class="line-num2">55</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> test_name = __name__</span> </div> </td> </tr><tr> <td id="d2h-495846-5156" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5156"> <div class="line-num1"></div> <div class="line-num2">56</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5167" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5167"> <div class="line-num1"></div> <div class="line-num2">57</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-495846-5178" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5178"> <div class="line-num1"></div> <div class="line-num2">58</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> if test_name</span> </div> </td> </tr><tr> <td id="d2h-495846-5189" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5189"> <div class="line-num1"></div> <div class="line-num2">59</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> "#{self.class.name}##{test_name}"</span> </div> </td> </tr><tr> <td id="d2h-495846-5200" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5200"> <div class="line-num1"></div> <div class="line-num2">60</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> else</span> </div> </td> </tr><tr> <td id="d2h-495846-5211" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5211"> <div class="line-num1"></div> <div class="line-num2">61</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> self.class.name</span> </div> </td> </tr><tr> <td id="d2h-495846-5222" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5222"> <div class="line-num1"></div> <div class="line-num2">62</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5233" class="d2h-code-linenumber d2h-ins"><a href="#d2h-495846-5233"> <div class="line-num1"></div> <div class="line-num2">63</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5244" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5244"> <div class="line-num1">49</div> <div class="line-num2">64</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5255" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5255"> <div class="line-num1">50</div> <div class="line-num2">65</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-495846-5266" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-495846-5266"> <div class="line-num1">51</div> <div class="line-num2">66</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-450584" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-450584">data/lib/mocha/integration/{mini_test → minitest}/exception_translation.rb</a></span> <span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -2,10 +2,10 @@ require 'mocha/expectation_error'</div> </td> </tr><tr> <td id="d2h-450584-5304" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5304"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-450584-5315" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5315"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td id="d2h-450584-5326" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5326"> <div class="line-num1">4</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module Integration</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">5</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> module <del>MiniTest</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">5</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> module <ins>Minitest</ins></span> </div> </td> </tr><tr> <td id="d2h-450584-5359" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5359"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def self.translate(exception)</span> </div> </td> </tr><tr> <td id="d2h-450584-5370" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5370"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> return exception unless exception.is_a?(::Mocha::ExpectationError)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">8</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> translated_exception = ::<del>MiniTest</del>::Assertion.new(exception.message)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> translated_exception = ::<ins>Minitest</ins>::Assertion.new(exception.message)</span> </div> </td> </tr><tr> <td id="d2h-450584-5403" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5403"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> translated_exception.set_backtrace(exception.backtrace)</span> </div> </td> </tr><tr> <td id="d2h-450584-5414" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5414"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> translated_exception</span> </div> </td> </tr><tr> <td id="d2h-450584-5425" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-450584-5425"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-534102" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-534102">data/lib/mocha/integration/minitest.rb</a></span> <span class="d2h-tag d2h-added d2h-added-tag">ADDED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -0,0 +1,28 @@</div> </td> </tr><tr> <td id="d2h-534102-5463" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5463"> <div class="line-num1"></div> <div class="line-num2">1</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'mocha/debug'</span> </div> </td> </tr><tr> <td id="d2h-534102-5474" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5474"> <div class="line-num1"></div> <div class="line-num2">2</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'mocha/detection/minitest'</span> </div> </td> </tr><tr> <td id="d2h-534102-5485" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5485"> <div class="line-num1"></div> <div class="line-num2">3</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'mocha/integration/minitest/adapter'</span> </div> </td> </tr><tr> <td id="d2h-534102-5496" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5496"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-534102-5507" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5507"> <div class="line-num1"></div> <div class="line-num2">5</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td id="d2h-534102-5518" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5518"> <div class="line-num1"></div> <div class="line-num2">6</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> module Integration</span> </div> </td> </tr><tr> <td id="d2h-534102-5529" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5529"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> module Minitest</span> </div> </td> </tr><tr> <td id="d2h-534102-5540" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5540"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def self.activate</span> </div> </td> </tr><tr> <td id="d2h-534102-5551" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5551"> <div class="line-num1"></div> <div class="line-num2">9</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> target = Detection::Minitest.testcase</span> </div> </td> </tr><tr> <td id="d2h-534102-5562" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5562"> <div class="line-num1"></div> <div class="line-num2">10</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> return false unless target</span> </div> </td> </tr><tr> <td id="d2h-534102-5573" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5573"> <div class="line-num1"></div> <div class="line-num2">11</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-534102-5584" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5584"> <div class="line-num1"></div> <div class="line-num2">12</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> minitest_version = Gem::Version.new(Detection::Minitest.version)</span> </div> </td> </tr><tr> <td id="d2h-534102-5595" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5595"> <div class="line-num1"></div> <div class="line-num2">13</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Debug.puts "Detected Minitest version: #{minitest_version}"</span> </div> </td> </tr><tr> <td id="d2h-534102-5606" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5606"> <div class="line-num1"></div> <div class="line-num2">14</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-534102-5617" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5617"> <div class="line-num1"></div> <div class="line-num2">15</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> unless Minitest::Adapter.applicable_to?(minitest_version)</span> </div> </td> </tr><tr> <td id="d2h-534102-5628" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5628"> <div class="line-num1"></div> <div class="line-num2">16</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> raise 'Versions of minitest earlier than v3.3.0 are not supported.'</span> </div> </td> </tr><tr> <td id="d2h-534102-5639" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5639"> <div class="line-num1"></div> <div class="line-num2">17</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-534102-5650" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5650"> <div class="line-num1"></div> <div class="line-num2">18</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-534102-5661" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5661"> <div class="line-num1"></div> <div class="line-num2">19</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> unless target < Minitest::Adapter</span> </div> </td> </tr><tr> <td id="d2h-534102-5672" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5672"> <div class="line-num1"></div> <div class="line-num2">20</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> Debug.puts "Applying #{Minitest::Adapter.description}"</span> </div> </td> </tr><tr> <td id="d2h-534102-5683" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5683"> <div class="line-num1"></div> <div class="line-num2">21</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> target.send(:include, Minitest::Adapter)</span> </div> </td> </tr><tr> <td id="d2h-534102-5694" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5694"> <div class="line-num1"></div> <div class="line-num2">22</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-534102-5705" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5705"> <div class="line-num1"></div> <div class="line-num2">23</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-534102-5716" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5716"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> true</span> </div> </td> </tr><tr> <td id="d2h-534102-5727" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5727"> <div class="line-num1"></div> <div class="line-num2">25</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-534102-5738" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5738"> <div class="line-num1"></div> <div class="line-num2">26</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-534102-5749" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5749"> <div class="line-num1"></div> <div class="line-num2">27</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-534102-5760" class="d2h-code-linenumber d2h-ins"><a href="#d2h-534102-5760"> <div class="line-num1"></div> <div class="line-num2">28</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-084852" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-084852">data/lib/mocha/integration/test_unit/adapter.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -37,6 +37,11 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-084852-5798" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-084852-5798"> <div class="line-num1">37</div> <div class="line-num2">37</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-084852-5809" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-084852-5809"> <div class="line-num1">38</div> <div class="line-num2">38</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> private</span> </div> </td> </tr><tr> <td id="d2h-084852-5820" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-084852-5820"> <div class="line-num1">39</div> <div class="line-num2">39</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-084852-5831" class="d2h-code-linenumber d2h-ins"><a href="#d2h-084852-5831"> <div class="line-num1"></div> <div class="line-num2">40</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-084852-5842" class="d2h-code-linenumber d2h-ins"><a href="#d2h-084852-5842"> <div class="line-num1"></div> <div class="line-num2">41</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def mocha_test_name</span> </div> </td> </tr><tr> <td id="d2h-084852-5853" class="d2h-code-linenumber d2h-ins"><a href="#d2h-084852-5853"> <div class="line-num1"></div> <div class="line-num2">42</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> name</span> </div> </td> </tr><tr> <td id="d2h-084852-5864" class="d2h-code-linenumber d2h-ins"><a href="#d2h-084852-5864"> <div class="line-num1"></div> <div class="line-num2">43</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-084852-5875" class="d2h-code-linenumber d2h-ins"><a href="#d2h-084852-5875"> <div class="line-num1"></div> <div class="line-num2">44</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-084852-5886" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-084852-5886"> <div class="line-num1">40</div> <div class="line-num2">45</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-084852-5897" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-084852-5897"> <div class="line-num1">41</div> <div class="line-num2">46</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def handle_mocha_expectation_error(exception)</span> </div> </td> </tr><tr> <td id="d2h-084852-5908" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-084852-5908"> <div class="line-num1">42</div> <div class="line-num2">47</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> return false unless exception.is_a?(Mocha::ExpectationError)</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-163311" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-163311">data/lib/mocha/minitest.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,6 +1,6 @@</div> </td> </tr><tr> <td id="d2h-163311-5946" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-163311-5946"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/ruby_version'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">2</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">require 'mocha/integration/<del>mini_test</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">2</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'mocha/integration/<ins>minitest</ins>'</span> </div> </td> </tr><tr> <td id="d2h-163311-5979" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-163311-5979"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">unless Mocha::Integration::<del>MiniTest</del>.activate</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">5</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> raise "<del>MiniTest</del> must be loaded *before* `require 'mocha/minitest'`."</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">unless Mocha::Integration::<ins>Minitest</ins>.activate</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">5</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> raise "<ins>Minitest</ins> must be loaded *before* `require 'mocha/minitest'`."</span> </div> </td> </tr><tr> <td id="d2h-163311-6034" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-163311-6034"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-804784" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-804784">data/lib/mocha/mock.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -100,7 +100,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6072" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6072"> <div class="line-num1">100</div> <div class="line-num2">100</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-804784-6083" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6083"> <div class="line-num1">101</div> <div class="line-num2">101</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Setup multiple expectations using +expected_methods_vs_return_values+.</span> </div> </td> </tr><tr> <td id="d2h-804784-6094" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6094"> <div class="line-num1">102</div> <div class="line-num2">102</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">103</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.expects(:<del>expected_method_one</del> <del>=> </del>:result_one, :<del>expected_method_two</del> <del>=> </del>:result_two)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">103</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.expects(<ins>expected_method_one</ins>: :result_one, <ins>expected_method_two</ins>: :result_two)</span> </div> </td> </tr><tr> <td id="d2h-804784-6127" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6127"> <div class="line-num1">104</div> <div class="line-num2">104</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-804784-6138" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6138"> <div class="line-num1">105</div> <div class="line-num2">105</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # is exactly equivalent to</span> </div> </td> </tr><tr> <td id="d2h-804784-6149" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6149"> <div class="line-num1">106</div> <div class="line-num2">106</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -114,6 +114,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6166" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6166"> <div class="line-num1">114</div> <div class="line-num2">114</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> method_name = args.shift</span> </div> </td> </tr><tr> <td id="d2h-804784-6177" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6177"> <div class="line-num1">115</div> <div class="line-num2">115</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ensure_method_not_already_defined(method_name)</span> </div> </td> </tr><tr> <td id="d2h-804784-6188" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6188"> <div class="line-num1">116</div> <div class="line-num2">116</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> expectation = Expectation.new(self, method_name, backtrace)</span> </div> </td> </tr><tr> <td id="d2h-804784-6199" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6199"> <div class="line-num1"></div> <div class="line-num2">117</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> expectation.in_sequence(@mockery.sequences.last) if @mockery.sequences.any?</span> </div> </td> </tr><tr> <td id="d2h-804784-6210" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6210"> <div class="line-num1">117</div> <div class="line-num2">118</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> expectation.returns(args.shift) unless args.empty?</span> </div> </td> </tr><tr> <td id="d2h-804784-6221" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6221"> <div class="line-num1">118</div> <div class="line-num2">119</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @expectations.add(expectation)</span> </div> </td> </tr><tr> <td id="d2h-804784-6232" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6232"> <div class="line-num1">119</div> <div class="line-num2">120</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -138,7 +139,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6249" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6249"> <div class="line-num1">138</div> <div class="line-num2">139</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-804784-6260" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6260"> <div class="line-num1">139</div> <div class="line-num2">140</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Setup multiple expectations using +stubbed_methods_vs_return_values+.</span> </div> </td> </tr><tr> <td id="d2h-804784-6271" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6271"> <div class="line-num1">140</div> <div class="line-num2">141</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">141</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.stubs(:<del>stubbed_method_one</del> <del>=> </del>:result_one, :<del>stubbed_method_two</del> <del>=> </del>:result_two)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">142</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.stubs(<ins>stubbed_method_one</ins>: :result_one, <ins>stubbed_method_two</ins>: :result_two)</span> </div> </td> </tr><tr> <td id="d2h-804784-6304" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6304"> <div class="line-num1">142</div> <div class="line-num2">143</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-804784-6315" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6315"> <div class="line-num1">143</div> <div class="line-num2">144</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # is exactly equivalent to</span> </div> </td> </tr><tr> <td id="d2h-804784-6326" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6326"> <div class="line-num1">144</div> <div class="line-num2">145</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -153,6 +154,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6343" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6343"> <div class="line-num1">153</div> <div class="line-num2">154</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ensure_method_not_already_defined(method_name)</span> </div> </td> </tr><tr> <td id="d2h-804784-6354" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6354"> <div class="line-num1">154</div> <div class="line-num2">155</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> expectation = Expectation.new(self, method_name, backtrace)</span> </div> </td> </tr><tr> <td id="d2h-804784-6365" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6365"> <div class="line-num1">155</div> <div class="line-num2">156</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> expectation.at_least(0)</span> </div> </td> </tr><tr> <td id="d2h-804784-6376" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6376"> <div class="line-num1"></div> <div class="line-num2">157</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> expectation.in_sequence(@mockery.sequences.last) if @mockery.sequences.any?</span> </div> </td> </tr><tr> <td id="d2h-804784-6387" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6387"> <div class="line-num1">156</div> <div class="line-num2">158</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> expectation.returns(args.shift) unless args.empty?</span> </div> </td> </tr><tr> <td id="d2h-804784-6398" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6398"> <div class="line-num1">157</div> <div class="line-num2">159</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @expectations.add(expectation)</span> </div> </td> </tr><tr> <td id="d2h-804784-6409" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6409"> <div class="line-num1">158</div> <div class="line-num2">160</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -309,12 +311,10 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6426" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6426"> <div class="line-num1">309</div> <div class="line-num2">311</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-804784-6437" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6437"> <div class="line-num1">310</div> <div class="line-num2">312</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-804784-6448" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6448"> <div class="line-num1">311</div> <div class="line-num2">313</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">312</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # rubocop:disable Style/MethodMissingSuper</span> </div> </td> </tr><tr> <td id="d2h-804784-6470" class="d2h-code-linenumber d2h-del"><a href="#d2h-804784-6470"> <div class="line-num1">313</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def method_missing(symbol, *arguments, &block)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">314</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>def method_missing(symbol, *arguments, &block) </ins># rubocop:disable Style/MethodMissingSuper</span> </div> </td> </tr><tr> <td id="d2h-804784-6492" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6492"> <div class="line-num1">314</div> <div class="line-num2">315</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> handle_method_call(symbol, arguments, block)</span> </div> </td> </tr><tr> <td id="d2h-804784-6503" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6503"> <div class="line-num1">315</div> <div class="line-num2">316</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-804784-6514" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6514"> <div class="line-num1">316</div> <div class="line-num2">317</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ruby2_keywords(:method_missing)</span> </div> </td> </tr><tr> <td id="d2h-804784-6525" class="d2h-code-linenumber d2h-del"><a href="#d2h-804784-6525"> <div class="line-num1">317</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # rubocop:enable Style/MethodMissingSuper</span> </div> </td> </tr><tr> <td id="d2h-804784-6536" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6536"> <div class="line-num1">318</div> <div class="line-num2">318</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-804784-6547" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6547"> <div class="line-num1">319</div> <div class="line-num2">319</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td id="d2h-804784-6558" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6558"> <div class="line-num1">320</div> <div class="line-num2">320</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def handle_method_call(symbol, arguments, block)</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -323,7 +323,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6575" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6575"> <div class="line-num1">323</div> <div class="line-num2">323</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> invocation = Invocation.new(self, symbol, arguments, block)</span> </div> </td> </tr><tr> <td id="d2h-804784-6586" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6586"> <div class="line-num1">324</div> <div class="line-num2">324</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> if (matching_expectation_allowing_invocation = all_expectations.match_allowing_invocation(invocation))</span> </div> </td> </tr><tr> <td id="d2h-804784-6597" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6597"> <div class="line-num1">325</div> <div class="line-num2">325</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> matching_expectation_allowing_invocation.invoke(invocation)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">326</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> elsif (matching_expectation = all_expectations.match(invocation)) || (!matching_expectation && !@everything_stubbed)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">326</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> elsif (matching_expectation = all_expectations.match(invocation<ins>, ignoring_order: true</ins>)) || (!matching_expectation && !@everything_stubbed)</span> </div> </td> </tr><tr> <td id="d2h-804784-6630" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6630"> <div class="line-num1">327</div> <div class="line-num2">327</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> raise_unexpected_invocation_error(invocation, matching_expectation)</span> </div> </td> </tr><tr> <td id="d2h-804784-6641" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6641"> <div class="line-num1">328</div> <div class="line-num2">328</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-804784-6652" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6652"> <div class="line-num1">329</div> <div class="line-num2">329</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -343,8 +343,8 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6669" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6669"> <div class="line-num1">343</div> <div class="line-num2">343</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-804784-6680" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6680"> <div class="line-num1">344</div> <div class="line-num2">344</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-804784-6691" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6691"> <div class="line-num1">345</div> <div class="line-num2">345</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">346</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def __expire__</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">347</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> @expired = true</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">346</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def __expire__<ins>(origin)</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">347</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> @expired = <ins>origin || </ins>true</span> </div> </td> </tr><tr> <td id="d2h-804784-6746" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6746"> <div class="line-num1">348</div> <div class="line-num2">348</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-804784-6757" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6757"> <div class="line-num1">349</div> <div class="line-num2">349</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-804784-6768" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6768"> <div class="line-num1">350</div> <div class="line-num2">350</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @private</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -373,7 +373,11 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6785" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6785"> <div class="line-num1">373</div> <div class="line-num2">373</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> if @unexpected_invocation.nil?</span> </div> </td> </tr><tr> <td id="d2h-804784-6796" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6796"> <div class="line-num1">374</div> <div class="line-num2">374</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @unexpected_invocation = invocation</span> </div> </td> </tr><tr> <td id="d2h-804784-6807" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6807"> <div class="line-num1">375</div> <div class="line-num2">375</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> matching_expectation.invoke(invocation) if matching_expectation</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">376</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>message</del> = <del>"#{</del>@unexpected_invocation.call_description<del>}\n#{@mockery.mocha_inspect}"</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">376</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>call_description</ins> = @unexpected_invocation.call_description</span> </div> </td> </tr><tr> <td id="d2h-804784-6840" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6840"> <div class="line-num1"></div> <div class="line-num2">377</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> if matching_expectation && !matching_expectation.in_correct_order?</span> </div> </td> </tr><tr> <td id="d2h-804784-6851" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6851"> <div class="line-num1"></div> <div class="line-num2">378</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> call_description += ' invoked out of order'</span> </div> </td> </tr><tr> <td id="d2h-804784-6862" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6862"> <div class="line-num1"></div> <div class="line-num2">379</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-804784-6873" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6873"> <div class="line-num1"></div> <div class="line-num2">380</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> message = "#{call_description}\n#{@mockery.mocha_inspect}"</span> </div> </td> </tr><tr> <td id="d2h-804784-6884" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6884"> <div class="line-num1">377</div> <div class="line-num2">381</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> else</span> </div> </td> </tr><tr> <td id="d2h-804784-6895" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6895"> <div class="line-num1">378</div> <div class="line-num2">382</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> message = @unexpected_invocation.short_call_description</span> </div> </td> </tr><tr> <td id="d2h-804784-6906" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6906"> <div class="line-num1">379</div> <div class="line-num2">383</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -389,8 +393,10 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-804784-6923" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6923"> <div class="line-num1">389</div> <div class="line-num2">393</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def check_expiry</span> </div> </td> </tr><tr> <td id="d2h-804784-6934" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6934"> <div class="line-num1">390</div> <div class="line-num2">394</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> return unless @expired</span> </div> </td> </tr><tr> <td id="d2h-804784-6945" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6945"> <div class="line-num1">391</div> <div class="line-num2">395</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-804784-6956" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6956"> <div class="line-num1"></div> <div class="line-num2">396</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> origin = @expired == true ? 'one test' : @expired</span> </div> </td> </tr><tr> <td id="d2h-804784-6967" class="d2h-code-linenumber d2h-ins"><a href="#d2h-804784-6967"> <div class="line-num1"></div> <div class="line-num2">397</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-804784-6978" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-6978"> <div class="line-num1">392</div> <div class="line-num2">398</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> sentences = [</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">393</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> "#{mocha_inspect} was instantiated in <del>one</del> <del>test </del>but it is receiving invocations within another test.",</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">399</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> "#{mocha_inspect} was instantiated in <ins>#{origin}</ins> but it is receiving invocations within another test.",</span> </div> </td> </tr><tr> <td id="d2h-804784-7011" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-7011"> <div class="line-num1">394</div> <div class="line-num2">400</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> 'This can lead to unintended interactions between tests and hence unexpected test failures.',</span> </div> </td> </tr><tr> <td id="d2h-804784-7022" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-7022"> <div class="line-num1">395</div> <div class="line-num2">401</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> 'Ensure that every test correctly cleans up any state that it introduces.'</span> </div> </td> </tr><tr> <td id="d2h-804784-7033" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-804784-7033"> <div class="line-num1">396</div> <div class="line-num2">402</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ]</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-849984" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-849984">data/lib/mocha/mockery.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -48,8 +48,8 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-849984-7071" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7071"> <div class="line-num1">48</div> <div class="line-num2">48</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> instance.verify(*args)</span> </div> </td> </tr><tr> <td id="d2h-849984-7082" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7082"> <div class="line-num1">49</div> <div class="line-num2">49</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-849984-7093" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7093"> <div class="line-num1">50</div> <div class="line-num2">50</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">51</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def teardown</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">52</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> instance.teardown</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">51</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def teardown<ins>(origin = nil)</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">52</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> instance.teardown<ins>(origin)</ins></span> </div> </td> </tr><tr> <td id="d2h-849984-7148" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7148"> <div class="line-num1">53</div> <div class="line-num2">53</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> ensure</span> </div> </td> </tr><tr> <td id="d2h-849984-7159" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7159"> <div class="line-num1">54</div> <div class="line-num2">54</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @instances.pop</span> </div> </td> </tr><tr> <td id="d2h-849984-7170" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7170"> <div class="line-num1">55</div> <div class="line-num2">55</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -91,9 +91,9 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-849984-7187" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7187"> <div class="line-num1">91</div> <div class="line-num2">91</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-849984-7198" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7198"> <div class="line-num1">92</div> <div class="line-num2">92</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-849984-7209" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7209"> <div class="line-num1">93</div> <div class="line-num2">93</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">94</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def teardown</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">94</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def teardown<ins>(origin = nil)</ins></span> </div> </td> </tr><tr> <td id="d2h-849984-7242" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7242"> <div class="line-num1">95</div> <div class="line-num2">95</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> stubba.unstub_all</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">96</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> mocks.each(<del>&:__expire__</del>)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">96</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> mocks.each<ins> { |m| m.__expire__</ins>(<ins>origin</ins>)<ins> }</ins></span> </div> </td> </tr><tr> <td id="d2h-849984-7275" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7275"> <div class="line-num1">97</div> <div class="line-num2">97</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> reset</span> </div> </td> </tr><tr> <td id="d2h-849984-7286" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7286"> <div class="line-num1">98</div> <div class="line-num2">98</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-849984-7297" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7297"> <div class="line-num1">99</div> <div class="line-num2">99</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -109,6 +109,10 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-849984-7314" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7314"> <div class="line-num1">109</div> <div class="line-num2">109</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> @state_machines ||= []</span> </div> </td> </tr><tr> <td id="d2h-849984-7325" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7325"> <div class="line-num1">110</div> <div class="line-num2">110</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-849984-7336" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7336"> <div class="line-num1">111</div> <div class="line-num2">111</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-849984-7347" class="d2h-code-linenumber d2h-ins"><a href="#d2h-849984-7347"> <div class="line-num1"></div> <div class="line-num2">112</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def sequences</span> </div> </td> </tr><tr> <td id="d2h-849984-7358" class="d2h-code-linenumber d2h-ins"><a href="#d2h-849984-7358"> <div class="line-num1"></div> <div class="line-num2">113</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> @sequences ||= []</span> </div> </td> </tr><tr> <td id="d2h-849984-7369" class="d2h-code-linenumber d2h-ins"><a href="#d2h-849984-7369"> <div class="line-num1"></div> <div class="line-num2">114</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-849984-7380" class="d2h-code-linenumber d2h-ins"><a href="#d2h-849984-7380"> <div class="line-num1"></div> <div class="line-num2">115</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-849984-7391" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7391"> <div class="line-num1">112</div> <div class="line-num2">116</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def mocha_inspect</span> </div> </td> </tr><tr> <td id="d2h-849984-7402" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7402"> <div class="line-num1">113</div> <div class="line-num2">117</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> message = ''</span> </div> </td> </tr><tr> <td id="d2h-849984-7413" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-849984-7413"> <div class="line-num1">114</div> <div class="line-num2">118</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> message << "unsatisfied expectations:\n- #{unsatisfied_expectations.map(&:mocha_inspect).join("\n- ")}\n" if unsatisfied_expectations.any?</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-653224" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-653224">data/lib/mocha/object_methods.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -59,7 +59,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-653224-7451" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7451"> <div class="line-num1">59</div> <div class="line-num2">59</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-653224-7462" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7462"> <div class="line-num1">60</div> <div class="line-num2">60</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Setting up multiple expectations on a non-mock object.</span> </div> </td> </tr><tr> <td id="d2h-653224-7473" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7473"> <div class="line-num1">61</div> <div class="line-num2">61</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # product = Product.new</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">62</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # product.expects(<del>:</del>valid<del>?</del> <del>=> </del>true, :<del>save</del> <del>=> </del>true)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">62</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # product.expects(valid<ins>?:</ins> true, <ins>save</ins>: true)</span> </div> </td> </tr><tr> <td id="d2h-653224-7506" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7506"> <div class="line-num1">63</div> <div class="line-num2">63</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-653224-7517" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7517"> <div class="line-num1">64</div> <div class="line-num2">64</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # exactly equivalent to</span> </div> </td> </tr><tr> <td id="d2h-653224-7528" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7528"> <div class="line-num1">65</div> <div class="line-num2">65</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -108,7 +108,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-653224-7545" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7545"> <div class="line-num1">108</div> <div class="line-num2">108</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-653224-7556" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7556"> <div class="line-num1">109</div> <div class="line-num2">109</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Setting up multiple stubbed methods on a non-mock object.</span> </div> </td> </tr><tr> <td id="d2h-653224-7567" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7567"> <div class="line-num1">110</div> <div class="line-num2">110</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # product = Product.new</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">111</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # product.stubs(<del>:</del>valid<del>?</del> <del>=> </del>true, :<del>save</del> <del>=> </del>true)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">111</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # product.stubs(valid<ins>?:</ins> true, <ins>save</ins>: true)</span> </div> </td> </tr><tr> <td id="d2h-653224-7600" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7600"> <div class="line-num1">112</div> <div class="line-num2">112</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-653224-7611" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7611"> <div class="line-num1">113</div> <div class="line-num2">113</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # exactly equivalent to</span> </div> </td> </tr><tr> <td id="d2h-653224-7622" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-653224-7622"> <div class="line-num1">114</div> <div class="line-num2">114</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-200953" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-200953">data/lib/mocha/parameter_matchers/base.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -21,12 +21,12 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-200953-7660" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7660"> <div class="line-num1">21</div> <div class="line-num2">21</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Alternative ways to combine matchers with a logical AND.</span> </div> </td> </tr><tr> <td id="d2h-200953-7671" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7671"> <div class="line-num1">22</div> <div class="line-num2">22</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td id="d2h-200953-7682" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7682"> <div class="line-num1">23</div> <div class="line-num2">23</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:run).with(all_of(has_key(:foo), has_key(:bar)))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">24</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.run(:<del>foo</del> <del>=> </del>'foovalue', :<del>bar</del> <del>=> </del>'barvalue')</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">24</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.run(<ins>foo</ins>: 'foovalue', <ins>bar</ins>: 'barvalue')</span> </div> </td> </tr><tr> <td id="d2h-200953-7715" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7715"> <div class="line-num1">25</div> <div class="line-num2">25</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-200953-7726" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7726"> <div class="line-num1">26</div> <div class="line-num2">26</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # is exactly equivalent to</span> </div> </td> </tr><tr> <td id="d2h-200953-7737" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7737"> <div class="line-num1">27</div> <div class="line-num2">27</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-200953-7748" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7748"> <div class="line-num1">28</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:run).with(has_key(:foo) & has_key(:bar))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">29</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.run(:<del>foo</del> <del>=> </del>'foovalue', :<del>bar</del> <del>=> </del>'barvalue)</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">29</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.run(<ins>foo</ins>: 'foovalue', <ins>bar</ins>: 'barvalue)</span> </div> </td> </tr><tr> <td id="d2h-200953-7781" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7781"> <div class="line-num1">30</div> <div class="line-num2">30</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> def &(other)</span> </div> </td> </tr><tr> <td id="d2h-200953-7792" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7792"> <div class="line-num1">31</div> <div class="line-num2">31</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> AllOf.new(self, other)</span> </div> </td> </tr><tr> <td id="d2h-200953-7803" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7803"> <div class="line-num1">32</div> <div class="line-num2">32</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -45,12 +45,12 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-200953-7820" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7820"> <div class="line-num1">45</div> <div class="line-num2">45</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Alternative ways to combine matchers with a logical OR.</span> </div> </td> </tr><tr> <td id="d2h-200953-7831" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7831"> <div class="line-num1">46</div> <div class="line-num2">46</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td id="d2h-200953-7842" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7842"> <div class="line-num1">47</div> <div class="line-num2">47</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:run).with(any_of(has_key(:foo), has_key(:bar)))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">48</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.run(:<del>foo</del> <del>=> </del>'foovalue')</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">48</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.run(<ins>foo</ins>: 'foovalue')</span> </div> </td> </tr><tr> <td id="d2h-200953-7875" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7875"> <div class="line-num1">49</div> <div class="line-num2">49</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-200953-7886" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7886"> <div class="line-num1">50</div> <div class="line-num2">50</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # is exactly equivalent to</span> </div> </td> </tr><tr> <td id="d2h-200953-7897" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7897"> <div class="line-num1">51</div> <div class="line-num2">51</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-200953-7908" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7908"> <div class="line-num1">52</div> <div class="line-num2">52</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:run).with(has_key(:foo) | has_key(:bar))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">53</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.run(:<del>foo</del> <del>=> </del>'foovalue')</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">53</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.run(<ins>foo</ins>: 'foovalue')</span> </div> </td> </tr><tr> <td id="d2h-200953-7941" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7941"> <div class="line-num1">54</div> <div class="line-num2">54</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-200953-7952" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7952"> <div class="line-num1">55</div> <div class="line-num2">55</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Using an explicit {Equals} matcher in combination with {#|}.</span> </div> </td> </tr><tr> <td id="d2h-200953-7963" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-200953-7963"> <div class="line-num1">56</div> <div class="line-num2">56</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:run).with(equals(1) | equals(2))</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-945855" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-945855">data/lib/mocha/parameter_matchers/includes.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -24,7 +24,7 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-945855-8001" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8001"> <div class="line-num1">24</div> <div class="line-num2">24</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Actual parameter includes item which matches nested matcher.</span> </div> </td> </tr><tr> <td id="d2h-945855-8012" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8012"> <div class="line-num1">25</div> <div class="line-num2">25</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td id="d2h-945855-8023" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8023"> <div class="line-num1">26</div> <div class="line-num2">26</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:method_1).with(includes(has_key(:key)))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">27</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.method_1(['foo', 'bar', {:<del>key</del> <del>=> </del>'baz'}])</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">27</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.method_1(['foo', 'bar', {<ins>key</ins>: 'baz'}])</span> </div> </td> </tr><tr> <td id="d2h-945855-8056" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8056"> <div class="line-num1">28</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # no error raised</span> </div> </td> </tr><tr> <td id="d2h-945855-8067" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8067"> <div class="line-num1">29</div> <div class="line-num2">29</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-945855-8078" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8078"> <div class="line-num1">30</div> <div class="line-num2">30</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Actual parameter does not include item matching nested matcher.</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -44,11 +44,11 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-945855-8095" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8095"> <div class="line-num1">44</div> <div class="line-num2">44</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Actual parameter is a Hash including the given key.</span> </div> </td> </tr><tr> <td id="d2h-945855-8106" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8106"> <div class="line-num1">45</div> <div class="line-num2">45</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td id="d2h-945855-8117" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8117"> <div class="line-num1">46</div> <div class="line-num2">46</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:method_1).with(includes(:bar))</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">47</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.method_1({:<del>foo</del> <del>=> </del>1, :<del>bar</del> <del>=> </del>2})</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">47</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.method_1({<ins>foo</ins>: 1, <ins>bar</ins>: 2})</span> </div> </td> </tr><tr> <td id="d2h-945855-8150" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8150"> <div class="line-num1">48</div> <div class="line-num2">48</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # no error raised</span> </div> </td> </tr><tr> <td id="d2h-945855-8161" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8161"> <div class="line-num1">49</div> <div class="line-num2">49</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-945855-8172" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8172"> <div class="line-num1">50</div> <div class="line-num2">50</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Actual parameter is a Hash without the given key.</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">51</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # object.method_1({:<del>foo</del> <del>=> </del>1, :<del>baz</del> <del>=> </del>2})</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">51</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.method_1({<ins>foo</ins>: 1, <ins>baz</ins>: 2})</span> </div> </td> </tr><tr> <td id="d2h-945855-8205" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8205"> <div class="line-num1">52</div> <div class="line-num2">52</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # error raised, because hash does not include key 'bar'</span> </div> </td> </tr><tr> <td id="d2h-945855-8216" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8216"> <div class="line-num1">53</div> <div class="line-num2">53</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-945855-8227" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-945855-8227"> <div class="line-num1">54</div> <div class="line-num2">54</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @example Actual parameter is a Hash with a key matching the given matcher.</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-588235" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-588235">data/lib/mocha/parameter_matchers/responds_with.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,12 +1,18 @@</div> </td> </tr><tr> <td id="d2h-588235-8265" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8265"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'mocha/parameter_matchers/base'</span> </div> </td> </tr><tr> <td id="d2h-588235-8276" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8276"> <div class="line-num1"></div> <div class="line-num2">2</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">require 'mocha/parameter_matchers/all_of'</span> </div> </td> </tr><tr> <td id="d2h-588235-8287" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8287"> <div class="line-num1">2</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">require 'yaml'</span> </div> </td> </tr><tr> <td id="d2h-588235-8298" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8298"> <div class="line-num1">3</div> <div class="line-num2">4</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-588235-8309" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8309"> <div class="line-num1">4</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td id="d2h-588235-8320" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8320"> <div class="line-num1">5</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> module ParameterMatchers</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">6</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # <del>Matches</del> <del>any</del> <del>object that responds to +</del>message<del>+</del> <del>with +</del>result<del>+. To put it another way, it tests the quack, not the duck.</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">7</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # <ins>@overload</ins> <ins>def</ins> <ins>responds_with(</ins>message<ins>,</ins> result<ins>)</ins></span> </div> </td> </tr><tr> <td id="d2h-588235-8353" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8353"> <div class="line-num1"></div> <div class="line-num2">8</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Matches any object that responds to +message+ with +result+. To put it another way, it tests the quack, not the duck.</span> </div> </td> </tr><tr> <td id="d2h-588235-8364" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8364"> <div class="line-num1"></div> <div class="line-num2">9</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @param [Symbol] message method to invoke.</span> </div> </td> </tr><tr> <td id="d2h-588235-8375" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8375"> <div class="line-num1"></div> <div class="line-num2">10</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @param [Object] result expected result of sending +message+.</span> </div> </td> </tr><tr> <td id="d2h-588235-8386" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8386"> <div class="line-num1"></div> <div class="line-num2">11</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @overload def responds_with(messages_vs_results)</span> </div> </td> </tr><tr> <td id="d2h-588235-8397" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8397"> <div class="line-num1"></div> <div class="line-num2">12</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # Matches any object that responds to all the messages with the corresponding results as specified by +messages_vs_results+.</span> </div> </td> </tr><tr> <td id="d2h-588235-8408" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8408"> <div class="line-num1"></div> <div class="line-num2">13</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @param [Hash<Symbol,Object>] messages_vs_results +Hash+ of messages vs results.</span> </div> </td> </tr><tr> <td id="d2h-588235-8419" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8419"> <div class="line-num1"></div> <div class="line-num2">14</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # @raise [ArgumentError] if +messages_vs_results+ does not contain at least one entry.</span> </div> </td> </tr><tr> <td id="d2h-588235-8430" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8430"> <div class="line-num1">7</div> <div class="line-num2">15</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-588235-8441" class="d2h-code-linenumber d2h-del"><a href="#d2h-588235-8441"> <div class="line-num1">8</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # @param [Symbol] message method to invoke.</span> </div> </td> </tr><tr> <td id="d2h-588235-8452" class="d2h-code-linenumber d2h-del"><a href="#d2h-588235-8452"> <div class="line-num1">9</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> # @param [Object] result expected result of sending +message+.</span> </div> </td> </tr><tr> <td id="d2h-588235-8463" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8463"> <div class="line-num1">10</div> <div class="line-num2">16</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @return [RespondsWith] parameter matcher.</span> </div> </td> </tr><tr> <td id="d2h-588235-8474" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8474"> <div class="line-num1">11</div> <div class="line-num2">17</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> #</span> </div> </td> </tr><tr> <td id="d2h-588235-8485" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8485"> <div class="line-num1">12</div> <div class="line-num2">18</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # @see Expectation#with</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -22,8 +28,29 @@ module Mocha</div> </td> </tr><tr> <td id="d2h-588235-8502" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8502"> <div class="line-num1">22</div> <div class="line-num2">28</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.expects(:method_1).with(responds_with(:upcase, "BAR"))</span> </div> </td> </tr><tr> <td id="d2h-588235-8513" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8513"> <div class="line-num1">23</div> <div class="line-num2">29</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # object.method_1("foo")</span> </div> </td> </tr><tr> <td id="d2h-588235-8524" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8524"> <div class="line-num1">24</div> <div class="line-num2">30</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # # error raised, because "foo".upcase != "BAR"</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">25</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> <del>def responds_with(message, result)</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">26</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"><del> RespondsWith</del>.<del>new(message, result)</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">31</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> <ins>#</ins></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">32</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><ins> # @example Actual parameter responds with "FOO" when :upcase is invoked and "oof" when :reverse is invoked</ins>.</span> </div> </td> </tr><tr> <td id="d2h-588235-8579" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8579"> <div class="line-num1"></div> <div class="line-num2">33</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object = mock()</span> </div> </td> </tr><tr> <td id="d2h-588235-8590" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8590"> <div class="line-num1"></div> <div class="line-num2">34</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.expects(:method_1).with(responds_with(upcase: "FOO", reverse: "oof"))</span> </div> </td> </tr><tr> <td id="d2h-588235-8601" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8601"> <div class="line-num1"></div> <div class="line-num2">35</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # object.method_1("foo")</span> </div> </td> </tr><tr> <td id="d2h-588235-8612" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8612"> <div class="line-num1"></div> <div class="line-num2">36</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> # # no error raised, because "foo".upcase == "FOO" and "foo".reverse == "oof"</span> </div> </td> </tr><tr> <td id="d2h-588235-8623" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8623"> <div class="line-num1"></div> <div class="line-num2">37</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> def responds_with(*options)</span> </div> </td> </tr><tr> <td id="d2h-588235-8634" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8634"> <div class="line-num1"></div> <div class="line-num2">38</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> case options.length</span> </div> </td> </tr><tr> <td id="d2h-588235-8645" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8645"> <div class="line-num1"></div> <div class="line-num2">39</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> when 0</span> </div> </td> </tr><tr> <td id="d2h-588235-8656" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8656"> <div class="line-num1"></div> <div class="line-num2">40</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> raise ArgumentError, 'No arguments. Expecting at least one.'</span> </div> </td> </tr><tr> <td id="d2h-588235-8667" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8667"> <div class="line-num1"></div> <div class="line-num2">41</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> when 1</span> </div> </td> </tr><tr> <td id="d2h-588235-8678" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8678"> <div class="line-num1"></div> <div class="line-num2">42</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> option = options.first</span> </div> </td> </tr><tr> <td id="d2h-588235-8689" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8689"> <div class="line-num1"></div> <div class="line-num2">43</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> raise ArgumentError, 'Argument is not a Hash.' unless option.is_a?(Hash)</span> </div> </td> </tr><tr> <td id="d2h-588235-8700" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8700"> <div class="line-num1"></div> <div class="line-num2">44</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> raise ArgumentError, 'Argument has no entries.' if option.empty?</span> </div> </td> </tr><tr> <td id="d2h-588235-8711" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8711"> <div class="line-num1"></div> <div class="line-num2">45</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-588235-8722" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8722"> <div class="line-num1"></div> <div class="line-num2">46</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> matchers = option.map { |message, result| RespondsWith.new(message, result) }</span> </div> </td> </tr><tr> <td id="d2h-588235-8733" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8733"> <div class="line-num1"></div> <div class="line-num2">47</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> AllOf.new(*matchers)</span> </div> </td> </tr><tr> <td id="d2h-588235-8744" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8744"> <div class="line-num1"></div> <div class="line-num2">48</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> when 2</span> </div> </td> </tr><tr> <td id="d2h-588235-8755" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8755"> <div class="line-num1"></div> <div class="line-num2">49</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> message, result = options</span> </div> </td> </tr><tr> <td id="d2h-588235-8766" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8766"> <div class="line-num1"></div> <div class="line-num2">50</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> RespondsWith.new(message, result)</span> </div> </td> </tr><tr> <td id="d2h-588235-8777" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8777"> <div class="line-num1"></div> <div class="line-num2">51</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> else</span> </div> </td> </tr><tr> <td id="d2h-588235-8788" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8788"> <div class="line-num1"></div> <div class="line-num2">52</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> raise ArgumentError, 'Too many arguments; use either a single argument (must be a Hash) or two arguments (a message and a result).'</span> </div> </td> </tr><tr> <td id="d2h-588235-8799" class="d2h-code-linenumber d2h-ins"><a href="#d2h-588235-8799"> <div class="line-num1"></div> <div class="line-num2">53</div> </a></td> <td class="d2h-ins"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-588235-8810" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8810"> <div class="line-num1">27</div> <div class="line-num2">54</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-588235-8821" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8821"> <div class="line-num1">28</div> <div class="line-num2">55</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-588235-8832" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-588235-8832"> <div class="line-num1">29</div> <div class="line-num2">56</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> # Parameter matcher which matches if actual parameter returns expected result when specified method is invoked.</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-931638" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-931638">data/lib/mocha/version.rb</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,3 +1,3 @@</div> </td> </tr><tr> <td id="d2h-931638-8870" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-931638-8870"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">2</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> VERSION = '2.0<del>.4</del>'.freeze</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">2</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> VERSION = '2.<ins>2.</ins>0'.freeze</span> </div> </td> </tr><tr> <td id="d2h-931638-8903" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-931638-8903"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-323343" class="d2h-file-wrapper" data-lang="gemspec"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-323343">data/mocha.gemspec</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -6,7 +6,7 @@ Gem::Specification.new do |s|</div> </td> </tr><tr> <td id="d2h-323343-8941" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-323343-8941"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> s.name = 'mocha'</span> </div> </td> </tr><tr> <td id="d2h-323343-8952" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-323343-8952"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> s.version = Mocha::VERSION</span> </div> </td> </tr><tr> <td id="d2h-323343-8963" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-323343-8963"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> s.licenses = ['MIT', 'BSD-2-Clause']</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">9</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> s.required_ruby_version = '>= 2.<del>0</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">9</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> s.required_ruby_version = '>= 2.<ins>1</ins>'</span> </div> </td> </tr><tr> <td id="d2h-323343-8996" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-323343-8996"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-323343-9007" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-323343-9007"> <div class="line-num1">11</div> <div class="line-num2">11</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> s.authors = ['James Mead']</span> </div> </td> </tr><tr> <td id="d2h-323343-9018" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-323343-9018"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> s.description = 'Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.'</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-004177" class="d2h-file-wrapper" data-lang=""> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-004177">metadata</a></span> <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,14 +1,14 @@</div> </td> </tr><tr> <td id="d2h-004177-9056" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9056"> <div class="line-num1">1</div> <div class="line-num2">1</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">--- !ruby/object:Gem::Specification</span> </div> </td> </tr><tr> <td id="d2h-004177-9067" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9067"> <div class="line-num1">2</div> <div class="line-num2">2</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">name: mocha</span> </div> </td> </tr><tr> <td id="d2h-004177-9078" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9078"> <div class="line-num1">3</div> <div class="line-num2">3</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">version: !ruby/object:Gem::Version</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> version: 2.0<del>.4</del></span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">4</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> version: 2.<ins>2.</ins>0</span> </div> </td> </tr><tr> <td id="d2h-004177-9111" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9111"> <div class="line-num1">5</div> <div class="line-num2">5</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">platform: ruby</span> </div> </td> </tr><tr> <td id="d2h-004177-9122" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9122"> <div class="line-num1">6</div> <div class="line-num2">6</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">authors:</span> </div> </td> </tr><tr> <td id="d2h-004177-9133" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9133"> <div class="line-num1">7</div> <div class="line-num2">7</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- James Mead</span> </div> </td> </tr><tr> <td id="d2h-004177-9144" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9144"> <div class="line-num1">8</div> <div class="line-num2">8</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">autorequire:</span> </div> </td> </tr><tr> <td id="d2h-004177-9155" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9155"> <div class="line-num1">9</div> <div class="line-num2">9</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">bindir: bin</span> </div> </td> </tr><tr> <td id="d2h-004177-9166" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9166"> <div class="line-num1">10</div> <div class="line-num2">10</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">cert_chain: []</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">11</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">date: <del>2023</del>-<del>06</del>-10 00:00:00.000000000 Z</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">11</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">date: <ins>2024</ins>-<ins>04</ins>-10 00:00:00.000000000 Z</span> </div> </td> </tr><tr> <td id="d2h-004177-9199" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9199"> <div class="line-num1">12</div> <div class="line-num2">12</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">dependencies:</span> </div> </td> </tr><tr> <td id="d2h-004177-9210" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9210"> <div class="line-num1">13</div> <div class="line-num2">13</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- !ruby/object:Gem::Dependency</span> </div> </td> </tr><tr> <td id="d2h-004177-9221" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9221"> <div class="line-num1">14</div> <div class="line-num2">14</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> name: ruby2_keywords</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -58,7 +58,7 @@ files:</div> </td> </tr><tr> <td id="d2h-004177-9238" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9238"> <div class="line-num1">58</div> <div class="line-num2">58</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/configuration.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9249" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9249"> <div class="line-num1">59</div> <div class="line-num2">59</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/debug.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9260" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9260"> <div class="line-num1">60</div> <div class="line-num2">60</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/deprecation.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">61</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">- lib/mocha/detection/<del>mini_test</del>.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">61</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">- lib/mocha/detection/<ins>minitest</ins>.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9293" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9293"> <div class="line-num1">62</div> <div class="line-num2">62</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/detection/test_unit.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9304" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9304"> <div class="line-num1">63</div> <div class="line-num2">63</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/error_with_filtered_backtrace.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9315" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9315"> <div class="line-num1">64</div> <div class="line-num2">64</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/exception_raiser.rb</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -71,9 +71,9 @@ files:</div> </td> </tr><tr> <td id="d2h-004177-9332" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9332"> <div class="line-num1">71</div> <div class="line-num2">71</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/inspect.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9343" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9343"> <div class="line-num1">72</div> <div class="line-num2">72</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/instance_method.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9354" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9354"> <div class="line-num1">73</div> <div class="line-num2">73</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/integration/assertion_counter.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">74</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">- lib/mocha/integration/<del>mini_test</del>.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">75</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">- lib/mocha/integration/<del>mini_test</del>/adapter.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">76</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">- lib/mocha/integration/<del>mini_test</del>/exception_translation.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">74</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">- lib/mocha/integration/<ins>minitest</ins>.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">75</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">- lib/mocha/integration/<ins>minitest</ins>/adapter.rb</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">76</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn">- lib/mocha/integration/<ins>minitest</ins>/exception_translation.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9431" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9431"> <div class="line-num1">77</div> <div class="line-num2">77</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/integration/monkey_patcher.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9442" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9442"> <div class="line-num1">78</div> <div class="line-num2">78</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/integration/test_unit.rb</span> </div> </td> </tr><tr> <td id="d2h-004177-9453" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9453"> <div class="line-num1">79</div> <div class="line-num2">79</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">- lib/mocha/integration/test_unit/adapter.rb</span> </div> </td> </tr> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement</div> </td> </tr><tr> <td id="d2h-004177-9470" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9470"> <div class="line-num1">141</div> <div class="line-num2">141</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> requirements:</span> </div> </td> </tr><tr> <td id="d2h-004177-9481" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9481"> <div class="line-num1">142</div> <div class="line-num2">142</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> - - ">="</span> </div> </td> </tr><tr> <td id="d2h-004177-9492" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9492"> <div class="line-num1">143</div> <div class="line-num2">143</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> - !ruby/object:Gem::Version</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-del d2h-change"> <div class="line-num1">144</div> <div class="line-num2"></div> </a></td> <td class="d2h-del d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> version: '2.<del>0</del>'</span> </div> </td> </tr><tr> <td class="d2h-code-linenumber d2h-ins d2h-change"> <div class="line-num1"></div> <div class="line-num2">144</div> </a></td> <td class="d2h-ins d2h-change"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">+</span> <span class="d2h-code-line-ctn"> version: '2.<ins>1</ins>'</span> </div> </td> </tr><tr> <td id="d2h-004177-9525" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9525"> <div class="line-num1">145</div> <div class="line-num2">145</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn">required_rubygems_version: !ruby/object:Gem::Requirement</span> </div> </td> </tr><tr> <td id="d2h-004177-9536" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9536"> <div class="line-num1">146</div> <div class="line-num2">146</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> requirements:</span> </div> </td> </tr><tr> <td id="d2h-004177-9547" class="d2h-code-linenumber d2h-cntx"><a href="#d2h-004177-9547"> <div class="line-num1">147</div> <div class="line-num2">147</div> </a></td> <td class="d2h-cntx"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix"> </span> <span class="d2h-code-line-ctn"> - - ">="</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div id="d2h-452157" class="d2h-file-wrapper" data-lang="rb"> <div class="d2h-file-header"> <span class="d2h-file-name-wrapper"> <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"> <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path> </svg> <span class="d2h-file-name"><a href="#d2h-452157">data/lib/mocha/integration/mini_test.rb</a></span> <span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span></span> <label class="d2h-file-collapse"> <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed"> Viewed </label> </div> <div class="d2h-file-diff"> <div class="d2h-code-wrapper"> <table class="d2h-diff-table"> <tbody class="d2h-diff-tbody"> <tr> <td class="d2h-code-linenumber d2h-info"></td> <td class="d2h-info"> <div class="d2h-code-line">@@ -1,28 +0,0 @@</div> </td> </tr><tr> <td id="d2h-452157-9585" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9585"> <div class="line-num1">1</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">require 'mocha/debug'</span> </div> </td> </tr><tr> <td id="d2h-452157-9596" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9596"> <div class="line-num1">2</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">require 'mocha/detection/mini_test'</span> </div> </td> </tr><tr> <td id="d2h-452157-9607" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9607"> <div class="line-num1">3</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">require 'mocha/integration/mini_test/adapter'</span> </div> </td> </tr><tr> <td id="d2h-452157-9618" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9618"> <div class="line-num1">4</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-452157-9629" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9629"> <div class="line-num1">5</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">module Mocha</span> </div> </td> </tr><tr> <td id="d2h-452157-9640" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9640"> <div class="line-num1">6</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> module Integration</span> </div> </td> </tr><tr> <td id="d2h-452157-9651" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9651"> <div class="line-num1">7</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> module MiniTest</span> </div> </td> </tr><tr> <td id="d2h-452157-9662" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9662"> <div class="line-num1">8</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> def self.activate</span> </div> </td> </tr><tr> <td id="d2h-452157-9673" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9673"> <div class="line-num1">9</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> target = Detection::MiniTest.testcase</span> </div> </td> </tr><tr> <td id="d2h-452157-9684" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9684"> <div class="line-num1">10</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> return false unless target</span> </div> </td> </tr><tr> <td id="d2h-452157-9695" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9695"> <div class="line-num1">11</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-452157-9706" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9706"> <div class="line-num1">12</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> mini_test_version = Gem::Version.new(Detection::MiniTest.version)</span> </div> </td> </tr><tr> <td id="d2h-452157-9717" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9717"> <div class="line-num1">13</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Debug.puts "Detected MiniTest version: #{mini_test_version}"</span> </div> </td> </tr><tr> <td id="d2h-452157-9728" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9728"> <div class="line-num1">14</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-452157-9739" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9739"> <div class="line-num1">15</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> unless MiniTest::Adapter.applicable_to?(mini_test_version)</span> </div> </td> </tr><tr> <td id="d2h-452157-9750" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9750"> <div class="line-num1">16</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> raise 'Versions of minitest earlier than v3.3.0 are not supported.'</span> </div> </td> </tr><tr> <td id="d2h-452157-9761" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9761"> <div class="line-num1">17</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-452157-9772" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9772"> <div class="line-num1">18</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-452157-9783" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9783"> <div class="line-num1">19</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> unless target < MiniTest::Adapter</span> </div> </td> </tr><tr> <td id="d2h-452157-9794" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9794"> <div class="line-num1">20</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> Debug.puts "Applying #{MiniTest::Adapter.description}"</span> </div> </td> </tr><tr> <td id="d2h-452157-9805" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9805"> <div class="line-num1">21</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> target.send(:include, MiniTest::Adapter)</span> </div> </td> </tr><tr> <td id="d2h-452157-9816" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9816"> <div class="line-num1">22</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-452157-9827" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9827"> <div class="line-num1">23</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"><br></span> </div> </td> </tr><tr> <td id="d2h-452157-9838" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9838"> <div class="line-num1">24</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> true</span> </div> </td> </tr><tr> <td id="d2h-452157-9849" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9849"> <div class="line-num1">25</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-452157-9860" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9860"> <div class="line-num1">26</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-452157-9871" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9871"> <div class="line-num1">27</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn"> end</span> </div> </td> </tr><tr> <td id="d2h-452157-9882" class="d2h-code-linenumber d2h-del"><a href="#d2h-452157-9882"> <div class="line-num1">28</div> <div class="line-num2"></div> </a></td> <td class="d2h-del"> <div class="d2h-code-line"> <span class="d2h-code-line-prefix">-</span> <span class="d2h-code-line-ctn">end</span> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> <footer class='sticky-footer mt-3'> <div class='container text-center mb-3 copyright'> <a class='mr-4 text-gray-600' href='mailto:diffend@whitesourcesoftware.com'> Contact Us </a> <a class='mr-4 text-gray-600' href='https://www.whitesourcesoftware.com/terms-of-service/'> Terms of Service </a> <a class='mr-4 text-gray-600' href='https://www.whitesourcesoftware.com/privacy-policy/'> Privacy Policy </a> <a class='mr-4 text-gray-600' href='https://diffend.io/docs'> Docs </a> </div> <div class='container mt-4'> <div class='copyright text-center'> Copyright © 2024 Mend Software </div> </div> </footer> </div> </div> </div> </body> </html>