Verify code is runnable

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,

On Tue, Sep 27, 2011 at 3:55 AM, Anthony B. [email protected] wrote:

Thanks a Million,

Posted via

I think Laser ( should be able to
this, but when I tried I got a stacktrace. It might work for you. If
let the dev know how much you’d appreciate it :slight_smile:

As an alternative, you can do what’s called a “smoke test”, which is a
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
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).
actually check a number of things on these pages, but if there was a
like mismatched arity, the page would raise an error, and my tests would
find it.

Its a bit old (and I have not used it, so don;t no if it will work for
but DRuby ( does
static analysis and includes checks for wrong number of arguments


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs