Method: Webrat::Matchers::HaveSelector#tag_inspect

Defined in:
lib/webrat/core/matchers/have_selector.rb

#tag_inspectObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/webrat/core/matchers/have_selector.rb', line 19

def tag_inspect
  options = @options.dup
  count = options.delete(:count)
  content = options.delete(:content)

  html = "<#{@expected}"
  options.each do |k,v|
    html << " #{k}='#{v}'"
  end

  if content
    html << ">#{content}</#{@expected}>"
  else
    html << "/>"
  end

  html
end