<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html lang=‘en’ xml:lang=‘en’ xmlns=‘www.w3.org/1999/xhtml’>

<head>
  <title>rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/expectations.rb</title>
  <link href="screen.css" media="all" rel="stylesheet" type="text/css" />
  <link href="print.css" media="print" rel="stylesheet" type="text/css" />

  <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
  <script type="text/javascript" src="rcov.js"></script>
</head>
<body>
  <h1>Rspec Steps C0 Coverage Information - RCov</h1>
  <h2>rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/expectations.rb</h2>

  <div class="report_table_wrapper">
    <table class='report' id='report_table'>
      <thead>
        <tr>
          <th class="left_align">Name</th>
          <th class="right_align">Total Lines</th>
          <th class="right_align">Lines of Code</th>
          <th class="left_align">Total Coverage</th>
          <th class="left_align">Code Coverage</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="left_align"><a href="rcov-ruby-1_8-gems-rspec-expectations-2_5_0-lib-rspec-expectations_rb.html">rcov/ruby/1.8/gems/rspec-expectations-2.5.0/lib/rspec/expectations.rb</a></td>
          <td class='right_align'><tt>39</tt></td>
          <td class='right_align'><tt>13</tt></td>
          <td class="left_align"><div class="percent_graph_legend"><tt class=''>100.00%</tt></div>
        <div class="percent_graph">
          <div class="covered" style="width:100px"></div>
          <div class="uncovered" style="width:0px"></div>
        </div></td>
          <td class="left_align"><div class="percent_graph_legend"><tt class=''>100.00%</tt></div>
        <div class="percent_graph">
          <div class="covered" style="width:100px"></div>
          <div class="uncovered" style="width:0px"></div>
        </div></td>
        </tr>
      </tbody>
    </table>
  </div>

  <h3>Key</h3>

  <div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>

  <h3>Coverage Details</h3>

  <table class="details">
    <tbody>

        <tr class="marked">
          <td><pre><a name="line1">1</a> require 'rspec/expectations/extensions'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line2">2</a> require 'rspec/matchers'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line3">3</a> require 'rspec/expectations/fail_with'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line4">4</a> require 'rspec/expectations/errors'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line5">5</a> require 'rspec/expectations/deprecation'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line6">6</a> require 'rspec/expectations/handler'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line7">7</a> require 'rspec/expectations/version'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line8">8</a> require 'rspec/expectations/backward_compatibility'</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line9">9</a> require 'rspec/expectations/differ'</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line10">10</a> </pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line11">11</a> module RSpec</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line12">12</a>   </pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line13">13</a>   # RSpec::Expectations lets you set expectations on your objects.</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line14">14</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line15">15</a>   #   result.should == 37</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line16">16</a>   #   team.should have(11).players_on_the_field</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line17">17</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line18">18</a>   # == How Expectations work.</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line19">19</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line20">20</a>   # RSpec::Expectations adds two methods to Object:</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line21">21</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line22">22</a>   #   should(matcher=nil)</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line23">23</a>   #   should_not(matcher=nil)</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line24">24</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line25">25</a>   # Both methods take an optional Expression Matcher (See RSpec::Matchers).</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line26">26</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line27">27</a>   # When +should+ receives an Expression Matcher, it calls &lt;tt&gt;matches?(self)&lt;/tt&gt;. If</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line28">28</a>   # it returns +true+, the spec passes and execution continues. If it returns</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line29">29</a>   # +false+, then the spec fails with the message returned by &lt;tt&gt;matcher.failure_message&lt;/tt&gt;.</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line30">30</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line31">31</a>   # Similarly, when +should_not+ receives a matcher, it calls &lt;tt&gt;matches?(self)&lt;/tt&gt;. If</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line32">32</a>   # it returns +false+, the spec passes and execution continues. If it returns</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line33">33</a>   # +true+, then the spec fails with the message returned by &lt;tt&gt;matcher.negative_failure_message&lt;/tt&gt;.</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line34">34</a>   #</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line35">35</a>   # RSpec ships with a standard set of useful matchers, and writing your own</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line36">36</a>   # matchers is quite simple. See RSpec::Matchers for details.</pre></td>
        </tr>

        <tr class="marked">
          <td><pre><a name="line37">37</a>   module Expectations</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line38">38</a>   end</pre></td>
        </tr>

        <tr class="inferred">
          <td><pre><a name="line39">39</a> end</pre></td>
        </tr>

    </tbody>
  </table>

  <p>Generated on Fri Apr 22 17:22:42 -0700 2011 with <a href="http://github.com/relevance/rcov">rcov 0.9.8</a></p>

</body>

</html>