Sha256: 19ae2939d8e8da2b6ff16eb47ea5cf41446deb6440ff6139d23ffd585444a382

Contents?: true

Size: 743 Bytes

Versions: 10

Compression:

Stored size: 743 Bytes

Contents

require 'webrat/core/elements/field'

module Webrat
  Field.class_eval do
    def parse_rails_request_params(params)
      Rack::Utils.parse_nested_query(params)
    end
  end
end

module ActionController #:nodoc:
  IntegrationTest.class_eval do
    include Webrat::Methods
    include Webrat::Matchers
 
    # The Rails version of within supports passing in a model and Webrat
    # will apply a scope based on Rails' dom_id for that model.
    #
    # Example:
    #   within User.last do
    #     click_link "Delete"
    #   end
    def within(selector_or_object, &block)
      if selector_or_object.is_a?(String)
        super
      else
        super('#' + RecordIdentifier.dom_id(selector_or_object), &block)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
rails_customerbeats-0.0.5 test/support/webrat/integrations/rails.rb
rails_customerbeats-0.0.4 test/support/webrat/integrations/rails.rb
rails_customerbeats-0.3 test/support/webrat/integrations/rails.rb
enginex-0.2.0 lib/templates/root/test/webrat/integrations/rails.rb
devise-1.1.pre4 test/support/webrat/integrations/rails.rb
devise-1.1.pre3 test/support/webrat/integrations/rails.rb
enginex-0.1.0 lib/templates/root/test/webrat/integrations/rails.rb
devise-1.1.pre2 test/support/webrat/integrations/rails.rb
devise-1.1.pre test/support/webrat/integrations/rails.rb
rails_metrics-0.1 test/support/webrat/integrations/rails.rb