(#9186) Change to shared_examples_for
The build broke because I was using "shared_examples" which is not
available in older rspec versions, e.g. 2.3.0 (which is what our
windows jenkins nodes are configured with). Just changed the spec test
to use "shared_examples_for" instead.