Old school have_tag, with_tag(and more) matchers for rspec 3 (Nokogiri powered)
The rspec-html-matchers gem provides RSpec matchers for testing complex HTML output. It is designed to test HTML elements and attributes with developer-friendly error messages. The gem is built on top of Nokogiri and has support for Capybara testing framework. It offers a syntax similar to the have_tag matcher from RSpec. Installation is simple and usage examples are provided for matching tags, content, and form inputs.
The rspec-html-matchers gem is a valuable tool for testing complex HTML output in RSpec and Cucumber tests. It offers a user-friendly syntax, seamless integration with Capybara, and clear error messages for easier debugging. By providing RSpec matchers and shorthand matchers for various form input types, it simplifies the process of testing HTML content. Contributions from the community ensure the gem remains relevant and efficient for developers.