Registry / testing / rspec-hpricot-matchers

rspec-hpricot-matchers

JSON →
library1.0rbrubygemsunverified

Provides an implementation of rspec_on_rails' have_tag() matcher using Hpricot, available to non-Rails projects.

gem install rspec_hpricot_matchers
INSTALL
IMPORT
SIG · RSPEC-HPRICOT-MATC
R
rspec-hpricot-matchers
testingrubyv1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RSpecHpricotMatchers
require 'rspec_hpricot_matchers'

Test HTML content with have_tag matcher

require 'rspec_hpricot_matchers' RSpec.describe 'HTML' do include RSpecHpricotMatchers it { '<div>Hello</div>'.should have_tag('div', text: 'Hello') } end
Debug
Known issues
gotchaDepends on Hpricot, which is no longer maintained and may have compatibility issues.
fix
Consider using Nokogiri-based matchers like rspec-html-matchers.
affects: >= 1.0
Upgrade
Version history
1.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rspec-hpricot-matchers — gem install rspec-hpricot-matchers · libregistry