Refactor using rspec_given.