Refactored to use Rspec 'let' in .