Ruby Rails Testing

Hopefully some useful tips for auditing and bug hunting ruby rails apps.

  • Brakeman is a good start for automated source code analysis
  • Generate model and controller UML diagrams using
    • /myapp$ ~/railroady/bin/railroady -a -i -m -p -z -t –engine-controllers -C | dot -Tsvg > controllers.svg
  • Run $ rake routes to list controllers and routes
  • Improper use of regex.

Debug tips

  • <variable>.methods prints object methods
  • <variable>.inspect prints object values

Some useful links