Improve Rspec code