Refactored RSPEC tests.