test case for ruby scripts

How can one write test cases for ruby scripts present inside your “#{Rails.root/script/}” folder.