webrat, rspec, nokogiri segfault
Posted
by adamaig
on Stack Overflow
See other posts from Stack Overflow
or by adamaig
Published on 2010-01-20T14:01:42Z
Indexed on
2010/03/17
5:31 UTC
Read the original article
Hit count: 657
I'm getting a segfault in nokogiri (1.4.1) run (under cucumber 0.6.1/webrat 0.7.0/rspec 1.3.x)
response.should have_selector("div", :class => "fieldWithErrors")
and the div in the page is actually
<div class="fieldWithErrors validation_error"> stuff </div>
Everything runs fine if I just test nokogiri against a test document
>> require 'nokogiri'
>> doc = Nokogiri::HTML.parse("<div class='a b'>love to have problems</div>")
=> ...
>> doc.css(".a")
=> [#<Nokogiri::XML::Element:0x3d62ac name="div" attributes=[#<Nokogiri::XML::Attr:0x3d6258 name="class" value="a b">] children=[#<Nokogiri::XML::Text:0x3d5e68 "love to have problems">]>]
So I want to know how to setup a minimal webrat test of an html fragment document to help file a bug.
© Stack Overflow or respective owner