rspec optimization