Parent

Class Index [+]

Quicksearch

Hpricot::Elem

yehudakatz.com/2007/01/27/a-better-assert_select-assert_elements/ based on assert_elements Author: Yehuda Katz Email: wycats @nospam@ gmail.com Web: www.yehudakatz.com

which was based on HpricotTestHelper Author: Luke Redpath Email: contact @nospam@ lukeredpath.co.uk Web: www.lukeredpath.co.uk / opensource.agileevolved.com

Public Instance Methods

contain?(value) click to toggle source
    # File lib/merb-core/test/test_ext/hpricot.rb, line 13
13:   def contain?(value)
14:     self.inner_text.include?(value)
15:   end
Also aliased as: contains?
contains?(value) click to toggle source
Alias for: contain?
inner_text() click to toggle source

courtesy of ‘thomas’ from the comments of _whys blog - get in touch if you want a better credit!

    # File lib/merb-core/test/test_ext/hpricot.rb, line 27
27:   def inner_text
28:     self.children.collect do |child|
29:       child.is_a?(Hpricot::Text) ? child.content : ((child.respond_to?("inner_text") && child.inner_text) || "")
30:     end.join.strip
31:   end
match?(regex) click to toggle source
    # File lib/merb-core/test/test_ext/hpricot.rb, line 19
19:   def match?(regex)
20:     self.inner_text.match(regex)
21:   end
Also aliased as: matches?
matches?(regex) click to toggle source
Alias for: match?

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.