I wrote a Rails plugin which uses simian to look for duplicates lines in your
code and reports in html format, Textmate or Netbeans.
I wrote it using RSpec and I have included a RSpec custom matcher:
it { rails_application.
with_threshold_of_duplicate_lines(4).
should be_DRY }
If you use Autotest, your specs will fail the next time you do a nasty
copy-paste !!!
More details in http://21croissants.blogspot.com/2008/03/dry.html
Feedback and patches (with specs!) welcome ;-)
Jean-Michel
--
View this message in context:
http://www.nabble.com/Sharing%3A-dont_repeat_yourself-plugin-custom-RSpec-matcher-tp16965619p16965619.html
Sent from the rspec-users mailing list archive at Nabble.com.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users