# Heckle 1.2.0 Released

**URL:** <https://www.ruby-forum.com/t/heckle-1-2-0-released/85481>\
**Category:** Ruby\
**Created:** [February 13, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481 "2007-02-13T23:44:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 13, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/1 "2007-02-13T23:44:07Z")

</div>

heckle version 1.2.0 has been released!

[http://www.rubyforge.org/projects/seattlerb](http://www.rubyforge.org/projects/seattlerb)  
by Ryan D. and Kevin C.

Heckle is a mutation tester. It modifies your code and runs your  
tests to make sure they fail. The idea is that if code can be changed  
and your tests don’t notice, either that code isn’t being covered or  
it doesn’t do anything.

Changes:

== 1.2.0 / 2007-01-15

- 2 major enhancements:

- 3 minor enhancements:

- 1 bug fix:

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 14, 2007, 1:28am UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/2 "2007-02-14T01:28:17Z")

</div>

On Feb 13, 2007, at 2:43 PM, Ryan D. wrote:

> heckle version 1.2.0 has been released!

OOPS! I must opened an old email file. 1.3.0 was released today, not  
1.2.0.

== 1.3.0 / 2007-02-12

- 1 major enhancement:
  - Unified diffs for mutatated methods

- 4 minor enhancements:
  - Now returns exit status 1 if failed.
  - Added a simple report at the end.
  - Runs are now sorted by method.
  - Autodetects rails and changes test\_pattern accordingly.

- 2 bug fixes:
  - Aborts when an unknown method is supplied.
  - Escapes slashes in random regexps.

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 14, 2007, 3:40am UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/3 "2007-02-14T03:40:27Z")

</div>

OOPS! I must have grabbed the wrong paragraph by mistake. We released  
1.3.0 today, not 1.2.0.

== 1.3.0 / 2007-02-12

- 1 major enhancement:

- 4 minor enhancements:

- 2 bug fixes:

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 14, 2007, 3:13pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/4 "2007-02-14T15:13:32Z")

</div>

On Wed, 2007-02-14 at 07:43 +0900, Ryan D. wrote:

> heckle version 1.2.0 has been released!
> 
> [http://www.rubyforge.org/projects/seattlerb](http://www.rubyforge.org/projects/seattlerb)  
> by Ryan D. and Kevin C.
> 
> Heckle is a mutation tester. It modifies your code and runs your  
> tests to make sure they fail. The idea is that if code can be changed  
> and your tests don’t notice, either that code isn’t being covered or  
> it doesn’t do anything.

Hey Ryan, great stuff! I’ve just got one question: I’m adding some  
methods to Integer, String, etc., and I’m having trouble heckling my  
tests - when I do `heckle Integer’ for example, it runs though _each_  
method on Integer, not just the ones defined by myself. Is there a way  
to restrict the scope of the heckling?

Cheers,  
Daniel

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 14, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/5 "2007-02-14T15:55:39Z")

</div>

Daniel S. schrieb:

> tests - when I do `heckle Integer’ for example, it runs though _each_  
> method on Integer, not just the ones defined by myself. Is there a way  
> to restrict the scope of the heckling?  
> heckle --help  
> Usage: heckle class\_name [method\_name]  
> [snip]

==\> heckle Integer your\_method

Regards,  
Jan

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 14, 2007, 9:11pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/6 "2007-02-14T21:11:33Z")

</div>

On Feb 13, 7:39 pm, Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> OOPS! I must have grabbed the wrong paragraph by mistake. We released  
> 1.3.0 today, not 1.2.0.

Solaris 10  
Sun Studio Compiler 11

djberge-/export/home/djberge/workspace-550\>sudo gem install heckle  
Install required dependency hoe? [Yn] Y  
Install required dependency rubyforge? [Yn] Y  
Successfully installed heckle-1.3.0  
Successfully installed hoe-1.2.0  
Successfully installed rubyforge-0.4.0

(and later…)

djberge-/export/home/djberge/src/ruby-580\>heckle --help  
cc: illegal option -Wall  
/usr/local/lib/ruby/gems/1.8/gems/RubyInline-3.6.2/./inline.rb:408:in  
`build': error executing cc -G -xO5 -xipo -xtarget=ultra2e -Wall -W - Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing- noreturn -Werror -dalign -fns -xbuiltin=%all -xlibmil -xtarget=ultra2e -xO5 -xipo -I /usr/local/lib/ruby/1.8/sparc-solaris2.10 -o "/export/ home/djberge/.ruby_inline/Inline_ParseTree_a424.so" "/export/home/ djberge/.ruby_inline/Inline_ParseTree_a424.c" : 256 (CompilationError) Renamed /export/home/djberge/.ruby_inline/Inline_ParseTree_a424.c to / export/home/djberge/.ruby_inline/Inline_ParseTree_a424.c.bad from /usr/ local/lib/ruby/gems/1.8/gems/RubyInline-3.6.2/./inline.rb:628:in `inline’  
from /usr/local/lib/ruby/gems/1.8/gems/ParseTree-1.7.0/lib/  
parse\_tree.rb:214  
from /usr/local/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require’  
from /usr/local/lib/ruby/gems/1.8/gems/heckle-1.3.0/bin/…/lib/  
heckle.rb:2  
from /usr/local/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require’  
from /usr/local/lib/ruby/gems/1.8/gems/heckle-1.3.0/bin/…/lib/  
test\_unit\_heckler.rb:4  
from /usr/local/lib/ruby/site\_ruby/1.8/rubygems/  
custom\_require.rb:27:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require’  
from /usr/local/lib/ruby/gems/1.8/gems/heckle-1.3.0/bin/heckle:  
4  
from /usr/local/bin/heckle:18:in `load’  
from /usr/local/bin/heckle:18

I upgraded to ParseTree 1.7.0 but that didn’t seem to help. How do I  
make this work with Sun’s cc?

Thanks,

Dan

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 15, 2007, 3:07am UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/7 "2007-02-15T03:07:10Z")

</div>

On Feb 14, 2007, at 12:10 PM, Daniel B. wrote:

> On Feb 13, 7:39 pm, Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > OOPS! I must have grabbed the wrong paragraph by mistake. We released  
> > 1.3.0 today, not 1.2.0.

Dan… you know better. File a bug.

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 15, 2007, 3:13am UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/8 "2007-02-15T03:13:11Z")

</div>

On Feb 14, 2007, at 6:12 AM, Daniel S. wrote:

> Hey Ryan, great stuff! I’ve just got one question: I’m adding some  
> methods to Integer, String, etc., and I’m having trouble heckling my  
> tests - when I do `heckle Integer’ for example, it runs though _each_  
> method on Integer, not just the ones defined by myself. Is there a way  
> to restrict the scope of the heckling?

Other than the single method heckling that Jan points out, there is  
little I can offer. Because of the way that ruby and ParseTree work,  
heckle can’t really tell what is extending a class and what isn’t.  
That is pretty much just how it works internally. We do a good job of  
not bothering with the core methods, but YAML and a bunch of other  
stuff get layered on through rubygems and such.

I’d suggest either the single method heckling route or moving your  
code to a module and heckling that. We can extend heckle’s single  
method arg in the future to be more convenient. I want a persistent  
heckle mode that knows what failed last time.

---

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [February 15, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481/9 "2007-02-15T15:26:14Z")

</div>

On Thu, 2007-02-15 at 11:12 +0900, Ryan D. wrote:

> > > and your tests don’t notice, either that code isn’t being covered or  
> > > heckle can’t really tell what is extending a class and what isn’t.  
> > > That is pretty much just how it works internally. We do a good job of  
> > > not bothering with the core methods, but YAML and a bunch of other  
> > > stuff get layered on through rubygems and such.
> 
> I’d suggest either the single method heckling route or moving your  
> code to a module and heckling that. We can extend heckle’s single  
> method arg in the future to be more convenient. I want a persistent  
> heckle mode that knows what failed last time.

How about, when heckle first runs the tests, recording what methods were  
called, and then restricting the heckling to that? RCov should be able  
to point out if a method isn’t being covered at all, so heckle really  
just needs to test the quality of the tests and implementation.

Cheers,  
Daniel
