Got tests running on Rails 3: 369 tests, 486 assertions, 45 failures, 124 errors.

This commit is contained in:
José Valim
2010-02-16 14:31:49 +01:00
parent 6d29bcc467
commit 766316b5e7
54 changed files with 420 additions and 550 deletions

View File

@@ -0,0 +1,31 @@
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