Improve rspec tests