diff --git a/lib/webrat/core/field.rb b/lib/webrat/core/field.rb index 31e244b..d78db0f 100644 --- a/lib/webrat/core/field.rb +++ b/lib/webrat/core/field.rb @@ -1,7 +1,6 @@ require "cgi" require "webrat/core_extensions/blank" require "webrat/core_extensions/nil_to_param" -require "webrat/merb/param_parser" module Webrat class Field @@ -119,7 +118,8 @@ module Webrat elsif defined?(ActionController::AbstractRequest) ActionController::AbstractRequest else - Webrat::ParamParser #used for Merb + require "webrat/merb/param_parser" + Webrat::MerbParamParser end end diff --git a/lib/webrat/merb.rb b/lib/webrat/merb.rb index 7f10c61..0c62d73 100644 --- a/lib/webrat/merb.rb +++ b/lib/webrat/merb.rb @@ -1,5 +1,12 @@ require "webrat/core" +require "cgi" +gem "extlib" +require "extlib" +require "merb-core" + +HashWithIndifferentAccess = Mash + module Webrat class Session include Merb::Test::MakeRequest diff --git a/lib/webrat/merb/param_parser.rb b/lib/webrat/merb/param_parser.rb index 107d269..ee56b8d 100644 --- a/lib/webrat/merb/param_parser.rb +++ b/lib/webrat/merb/param_parser.rb @@ -1,12 +1,5 @@ -require "cgi" -gem "extlib" -require "extlib" -require "merb-core" - -HashWithIndifferentAccess = Mash - module Webrat - class ParamParser + class MerbParamParser def self.parse_query_parameters(query_string) Merb::Parse.query(query_string) end