fix problem on rspec version > 3
remove deprecated methods from spec