Tuesday, 15 June 2010

ruby on rails - weird url using capybara and rspec -



ruby on rails - weird url using capybara and rspec -

hi trying visit url in tests using visit

before { visit(packages_path(package)) # visit packages_path bundle }

both of these lines of code produce error in tests

failure/error: visit(packages_path(package)) actioncontroller::routingerror: no route matches [get] "/packages.515"

i'm expecting url /packages/515 per capybara api. i'm not sure happening here or why. help appreciated. avoid hardcoding url if possible.

this caused spelling error should have been visit package_path package. fixing error solved problem seeing.

ruby-on-rails rspec capybara

No comments:

Post a Comment