This test failed when I initially ran the the spec file. I think having duplicate code in the test and in the before block was the cause. When I commented out the duplicate code in the test it passed.