--bcaec54ee9c833205604ade9aa76 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Sep 27, 2011 at 3:55 AM, Anthony B. <atbrew / gmail.com> wrote: > Hi, > Before I start I realize the optimal solution is to have 100% code > coverage with tests, unfortunately we are not there yet. > > Yesterday I cam across a bug in our code base where the number of method > parameters had changed but not all references to the method had been > updated. My IDE Rubymine highlights this as an error. > > Is there a way to check my code base in something like the format of an > rspec test that would highlight such bugs entering the system? > > Thanks a Million, > Anthony > > -- > Posted via http://www.ruby-forum.com/. > > I think Laser (https://github.com/michaeledgar/laser/) should be able to do this, but when I tried I got a stacktrace. It might work for you. If not, let the dev know how much you'd appreciate it :) As an alternative, you can do what's called a "smoke test", which is a high level test that just runs the code and makes sure it doesn't raise any errors. You're not really unit testing anything, but you are executing the code, and so an error like this should reveal itself. For example, on my website I use Capybara to go to every page (it uses a headless browser). I actually check a number of things on these pages, but if there was a problem like mismatched arity, the page would raise an error, and my tests would find it. --bcaec54ee9c833205604ade9aa76--