From de2ba2caf8a15082b1686906473522b36f0801a6 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 30 Nov 2008 14:48:32 -0500 Subject: [PATCH] Ditching preloading of Webrat::Elements --- lib/webrat/core/scope.rb | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/lib/webrat/core/scope.rb b/lib/webrat/core/scope.rb index 28bf214..2c094b4 100644 --- a/lib/webrat/core/scope.rb +++ b/lib/webrat/core/scope.rb @@ -30,9 +30,6 @@ module Webrat def initialize(session, &block) #:nodoc: @session = session instance_eval(&block) if block_given? - - # preload - load_elements end # Verifies an input field or textarea exists on the current page, and stores a value for @@ -281,14 +278,6 @@ module Webrat end protected - - def load_elements - labels - fields - forms - areas - links - end def page_dom #:nodoc: return @response.dom if @response.respond_to?(:dom) @@ -323,27 +312,9 @@ module Webrat end end - def areas #:nodoc: - @areas ||= Area.load_all(@session, dom) - end - - def links #:nodoc: - @links ||= Link.load_all(@session, dom) - end - def forms #:nodoc: @forms ||= Form.load_all(@session, dom) end - def fields - @fields ||= Field.field_classes.map do |field_class| - field_class.load_all(@session, dom) - end.flatten - end - - def labels - @labels ||= Label.load_all(@session, dom) - end - end end