refactor rspec tests into separate contexts