remove deprecation warning from rspec and random puts statement