Make tests for helper_spec to work

* get rid of deprecations for stub!
* fix exception in the test about `protect_against_forgery?` is not defined