kucaahbe / rspec-html-matchers

Old school have_tag, with_tag(and more) matchers for rspec 3 (Nokogiri powered)
http://rubygems.org/gems/rspec-html-matchers
MIT License
199 stars 90 forks source link

undefined method `current_scope' for ActionController::TestResponse #1

Closed jensb closed 13 years ago

jensb commented 13 years ago

(original bug report deleted)

Stupid me - "response.should have_tag(..)" is of course wrong, it should have been "response.body.should have_tag(..)" or "rendered.should have_tag(..)". This works.

kucaahbe commented 13 years ago

yes, matchers works only with strings, I'll add this to documentation to prevent mistakes, and make things more clear, thanks for report!

kucaahbe commented 13 years ago

oh, also I saw you used "should have_tag('form')", I am planning to add some shortcut-matchers like have_form(with_text_field,with_submit) in 0.0.4 ver. All matchers here: http://rdoc.info/github/kucaahbe/rspec2-rails-views-matchers/master/file/docs/CHANGELOG.md#0_0_4-dev