Optimize rspec tests