Improved rspec tests