ruby - Issue with Rails 4.2.1 in routing paths -


1) messagecontroller should check status failure/error: :status runtimeerror: in order use #url_for, must include routing helpers explicitly. instance, include rails.application.routes.url_helpers. # /users/vishal/.rvm/gems/ruby-2.2.0/gems/actionpack-4.2.1/lib/abstract_controller/url_for.rb:13:in _routes

this error getting on running specs. route.rb file valid , when run rails server , hit status url shows page needed, while running rspec test case fails.

any suggestions?

as error says.. use application helpers in spec need include them explicitly applicationhelper doesn't include them default:

module applicationhelper   include rails.application.routes.url_helpers   ... end 

using rspec.. add rspec_helper.rb

rspec.configure |config|   config.include rails.application.routes.url_helpers   ... end 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -