suppress deprecation warnings with rspec 2.99 by using an adaptation of the rspec 3.0 code