Adding switch test case and updating to latest rspec syntax