[rspec-users] Sharing: dont_repeat_yourself plugin custom RSpec matcher

Ashley Moran ashley.moran at patchspace.co.uk
Thu May 1 12:07:40 EDT 2008

On 1 May 2008, at 16:00, 21croissants wrote:

> You're right and one of my next action will be to create a gem so it  
> can be
> use in any ruby project, I will keep the Rails plugin of course.

Cool, be sure to post here when you've gemified it :)

> At the moment, you can write :
> require ... specific your location ... +
> '/lib/dont_repeat_yourself/reporter'
> dry_reporter = DontRepeatYourself::Reporter.new
> dry_reporter.configure_simian_for_ruby_project("/home/jeanmichel/ 
> ruby/projects/dry-report/rails_plugin/vendor/plugins/ 
> dont_repeat_yourself")
> dry_reporter.html_rails_report
> It will generate the report (HTML, Textmate) in a file called
> DRY_report.html at the root folder of your rails app.
> I reckon this is not very handy - you need to create a Rails project  
> and
> install the plugin - but it will soon improve!

As a spoilt Rails developer I demand that everything written in Ruby  
works magically whatever I am doing :o)

This reminds me a bit of a time when I created a Rails project just to  
use AR migrations.  I think I'll wait for now until there is a gem  

Just out of curiosity, have you run your DRY reporter against the  
Rails code itself?  Might be interesting to see the results...



More information about the rspec-users mailing list