# Implementation for 5 \> x \> 4 / RSpec fuzz testing

**URL:** <https://www.ruby-forum.com/t/implementation-for-5-x-4-rspec-fuzz-testing/90754>\
**Category:** Ruby\
**Created:** [April 1, 2007, 2:05am UTC](https://www.ruby-forum.com/t/implementation-for-5-x-4-rspec-fuzz-testing/90754 "2007-04-01T02:05:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian\_GroSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3ec8ea/32.png) [@Florian\_GroSSSS](https://www.ruby-forum.com/u/Florian_GroSSSS)\
**Post date:** [April 1, 2007, 2:05am UTC](https://www.ruby-forum.com/t/implementation-for-5-x-4-rspec-fuzz-testing/90754/1 "2007-04-01T02:05:22Z")

</div>

Hi,

before going to sleep I had an idea for how to implement 5 \> x \> 4.  
It’s pretty simple an implementation. I remember reading on ruby-talk  
years ago that this was impossible to do without changing Ruby’s  
parser.

So, nothing big. I just don’t want this to decay on my hard disk. It  
demonstrates a fair bit of meta programming and that Ruby is powerful  
as well.

It’s available at [http://flgr.0x42.net/code/comp\_chain.rb](http://flgr.0x42.net/code/comp_chain.rb)

I’m also wondering if somebody has already thought about how to best  
do fuzz testing in RSpec? I know about RFuzz, but it seems to be web  
specific. Is there any official best practise for using random input  
in your specs?

Kind regards,  
Florian G.

---

<div class="post-metadata">

**Author:** ![Florian\_GroSSSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3ec8ea/32.png) [@Florian\_GroSSSS](https://www.ruby-forum.com/u/Florian_GroSSSS)\
**Post date:** [April 1, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/implementation-for-5-x-4-rspec-fuzz-testing/90754/2 "2007-04-01T17:19:58Z")

</div>

Florian Groß wrote:

> So, nothing big. I just don’t want this to decay on my hard disk. It  
> demonstrates a fair bit of meta programming and that Ruby is powerful  
> as well.
> 
> It’s available at [http://flgr.0x42.net/code/comp\_chain.rb](http://flgr.0x42.net/code/comp_chain.rb)  
> Ha! Coming from the guy who wrote Binding.of\_caller, I was expecting a  
> challenge. That’s ridiculously simple! Cool beans.

> I’m also wondering if somebody has already thought about how to best  
> do fuzz testing in RSpec?  
> The only thing that comes to mind is a presentation Jim W. did on a  
> prototype Contract Driven Development library.  
> [http://video.google.com/videoplay?docid=-3883668083321892812](http://video.google.com/videoplay?docid=-3883668083321892812)

Devin
