testing Ruby methods with Rspec