Improved rspec testing