More refactoring of rspec tests