Sha256: f8229766f3381d9781f28794abf34ef80d22ac9692738153f3fc38609a4f34eb
Contents?: true
Size: 616 Bytes
Versions: 7
Compression:
Stored size: 616 Bytes
Contents
def find_form_with_input_from_pages( pages, input_name ) find_page_with_form_with_input( pages, input_name ). forms.find { |form| form.inputs.include? input_name } end def find_page_with_form_with_input( pages, input_name ) pages.find do |page| page.forms.find { |form| form.inputs.include? input_name } end end def pages_should_have_form_with_input( pages, input_name ) find_page_with_form_with_input( pages, input_name ).should be_true end def pages_should_not_have_form_with_input( pages, input_name ) find_page_with_form_with_input( pages, input_name ).should be_false end
Version data entries
7 entries across 7 versions & 1 rubygems