Compatibility with spree 2.1
Fix visit error on spec test