Changes to fix rspec deprecated warnings