Spec fix: Don't depend on Nokogiri #inspect output
This commit is contained in:
parent
672bd583af
commit
ba95363486
@ -2,18 +2,16 @@ require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|||||||
|
|
||||||
module Webrat
|
module Webrat
|
||||||
describe Field do
|
describe Field do
|
||||||
unless RUBY_PLATFORM =~ /java/
|
it "should have nice inspect output" do
|
||||||
it "should have nice inspect output" do
|
html = <<-HTML
|
||||||
html = <<-HTML
|
<html>
|
||||||
<html>
|
<input type='checkbox' checked='checked' />
|
||||||
<input type='checkbox' checked='checked' />
|
</html>
|
||||||
</html>
|
HTML
|
||||||
HTML
|
|
||||||
|
|
||||||
element = Webrat::XML.document(html).css("input").first
|
element = Webrat::XML.document(html).css("input").first
|
||||||
checkbox = CheckboxField.new(nil, element)
|
checkbox = CheckboxField.new(nil, element)
|
||||||
checkbox.inspect.should =~ /#<Webrat::CheckboxField @element=<input type=['"]checkbox['"] checked(=['"]checked['"])?\/?>>/
|
checkbox.inspect.should =~ /^#<Webrat::CheckboxField @element=/
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user