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

Test for Capybara::Session definition, rather than Capybara #26

Closed Empact closed 11 years ago

Empact commented 11 years ago

...as Capybara can be defined even when Capbybara::Session is not, in which case we get:

NameError:
      uninitialized constant Capybara::Session
      /rspec-html-matchers-0.4.3/lib/rspec-html-matchers.rb:97:in `matches?'
Empact commented 11 years ago

BTW, this was encountered when testing on tddium.com. It's not generally the case that one will have Capybara but not Capybara::Session, but if it's all the same to the library, seems we may as well test for the thing we're aiming to use.

kucaahbe commented 11 years ago

Merged, thanks!