Test functions and Ruby on Rails