Sure.<br><br>Say I have Class A and to test it, Spec B. From a quick look at Spec B I&#39;m able to read the &#39;when&#39; and &#39;should&#39; descriptions and get a rough idea what the spec covers, yet nothing detailed, to do that I&#39;d have to read the Class and Spec in conjunction, even still, it may not be obvious if a specific method or object is mocked.
<br><br>For example:<br><br>my_important_method(meth1, meth2)<br><br>Say we have spec&#39;ed this to test the call with multiple values for meth1, but not for meth2. MockCov allows you to easily see that meth2 isn&#39;t stubbed and therefore that the behavior of my_important_method isn&#39;t sufficiently covered.
<br><br>Whereas Heckle lets you know about insufficient specs by performing mutations, MockCov should allow you to instead _see_ where the specs are lacking. I&#39;m not saying this is a replacement for Heckle; they should compliment each other quite well.
<br><br>The example I posted in the initial email is very poor. I&#39;m working on an new feature that will highlight variables in the code that were returned by mocked calls (it does so using ParseTree). I&#39;ll produce a better example to demonstrate that in the next few days.
<br><br><div><span class="gmail_quote">On 27/07/07, <b class="gmail_sendername">David Chelimsky</b> &lt;<a href="mailto:dchelimsky@gmail.com">dchelimsky@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 7/25/07, Ian Leitch &lt;<a href="mailto:port001@gmail.com">port001@gmail.com</a>&gt; wrote:<br>&gt; Hey list,<br>&gt;<br>&gt; RSpec is great, I&#39;ve been using it at work for a couple of months now. One<br>&gt; gripe I have is that I find it hard to know exactly to what extent my code
<br>&gt; is covered by the specs. I am aware of RCov and Heckle; they&#39;re great, but<br>&gt; I&#39;d like to demonstrate another perspective of coverage analysis I&#39;ve hacked<br>&gt; up.<br>&gt;<br>&gt; The perspective is that of what is mocked and what isn&#39;t, with RCov
<br>&gt; execution analysis mixed in for better viewing. My itch was &quot;To what extent<br>&gt; is my code mocked?&quot; -- hence the name MockCov.<br>&gt; It produces a report for each file with stubbed methods and executed lines
<br>&gt; highlighted. From that I can easily see what my specs failed to mock and<br>&gt; therefore most probably didn&#39;t specify any kind of behavior for.<br><br>I&#39;m not sure I understand how you get from this report to some action
<br>you need to take. Would you elaborate with a specific example?<br><br>&gt;<br>&gt; Here is a sample report:<br>&gt; <a href="http://zioko.com/review_drop.rb.html">http://zioko.com/review_drop.rb.html</a><br>&gt; (please forgive the small size of this sample, my employer understandably
<br>&gt; didn&#39;t want me showing too much of our code)<br>&gt;<br>&gt; You&#39;ll notice that there isn&#39;t any kind of statistical coverage summary, I&#39;m<br>&gt; not sure how to quantity the results and indeed haven&#39;t spent any time
<br>&gt; thinking about it; that can come later. For now I&#39;d just like to gauge the<br>&gt; response to this.<br>&gt;<br>&gt; I haven&#39;t packaged the code up yet, it&#39;s a horrible hack and needs to be<br>&gt; reworked from scratch; I need to talk with someone on how best to integrate
<br>&gt; it with RSpec before that happens though.<br>&gt;<br>&gt; Let me know your thoughts.<br>&gt;<br>&gt; Cheers<br>&gt; Ian<br>&gt; _______________________________________________<br>&gt; rspec-users mailing list<br>
&gt; <a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>&gt;<br>_______________________________________________
<br>rspec-users mailing list<br><a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-users">http://rubyforge.org/mailman/listinfo/rspec-users</a>
<br></blockquote></div><br>