(#2437) Fix the odd test failure

As I'm not fluent in rspec I did introduce some errors in the test,
which were not failing for me but did for others.
I slightly rewrote the test case, putting in constants the
test case (instead of instance variables in a before hook) so
now I can iterate one 'it' test.