Fix random ruby code in rspec