Skip to content

Commit

Permalink
Spec fix: Don't depend on Nokogiri #inspect output
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 15, 2009
1 parent 672bd58 commit ba95363
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions spec/private/core/field_spec.rb
Expand Up @@ -2,18 +2,16 @@

module Webrat
describe Field do
unless RUBY_PLATFORM =~ /java/
it "should have nice inspect output" do
html = <<-HTML
<html>
<input type='checkbox' checked='checked' />
</html>
HTML
it "should have nice inspect output" do
html = <<-HTML
<html>
<input type='checkbox' checked='checked' />
</html>
HTML

element = Webrat::XML.document(html).css("input").first
checkbox = CheckboxField.new(nil, element)
checkbox.inspect.should =~ /#<Webrat::CheckboxField @element=<input type=['"]checkbox['"] checked(=['"]checked['"])?\/?>>/
end
element = Webrat::XML.document(html).css("input").first
checkbox = CheckboxField.new(nil, element)
checkbox.inspect.should =~ /^#<Webrat::CheckboxField @element=/
end
end

Expand Down

0 comments on commit ba95363

Please sign in to comment.