diff --git a/lib/webrat/core/elements/field.rb b/lib/webrat/core/elements/field.rb index 7900d88..49c042c 100644 --- a/lib/webrat/core/elements/field.rb +++ b/lib/webrat/core/elements/field.rb @@ -87,10 +87,8 @@ module Webrat parse_rails_request_params("#{name}=#{escaped_value}") when :merb ::Merb::Parse.query("#{name}=#{escaped_value}") - when :mechanize - { name => value } else - { name => escaped_value } + { name => value } end end diff --git a/spec/integration/rack/test/webrat_rack_test.rb b/spec/integration/rack/test/webrat_rack_test.rb index 75e26d4..a2e2700 100644 --- a/spec/integration/rack/test/webrat_rack_test.rb +++ b/spec/integration/rack/test/webrat_rack_test.rb @@ -8,15 +8,15 @@ class WebratRackTest < Test::Unit::TestCase assert_have_tag("form[@method='post'][@action='/go']") end - # def test_submits_form - # visit "/go" - # fill_in "Name", :with => "World" - # fill_in "Email", :with => "world@example.org" - # click_button "Submit" - # - # assert_contain "Hello, World" - # assert_contain "Your email is: world@example.org" - # end + def test_submits_form + visit "/go" + fill_in "Name", :with => "World" + fill_in "Email", :with => "world@example.org" + click_button "Submit" + + assert_contain "Hello, World" + assert_contain "Your email is: world@example.org" + end def test_check_value_of_field visit "/"