added few small fixes to webrat

This commit is contained in:
Krzysztof Zylawy 2008-10-21 16:29:06 +01:00
parent 4ed917da61
commit ddd0dd70c3
2 changed files with 5 additions and 1 deletions

View File

@ -105,7 +105,7 @@ module Webrat
def merge_hash_values(a, b) # :nodoc: def merge_hash_values(a, b) # :nodoc:
a.keys.each do |k| a.keys.each do |k|
if b.has_key?(k) if b.has_key?(k)
case [a[k], b[k]].map(&:class) case [a[k], b[k]].map{|value| value.class}
when [Hash, Hash] when [Hash, Hash]
a[k] = merge_hash_values(a[k], b[k]) a[k] = merge_hash_values(a[k], b[k])
b.delete(k) b.delete(k)

View File

@ -1,3 +1,7 @@
Dir[File.join(File.dirname(__FILE__), "merb", "*.rb")].sort.each do |file|
require File.expand_path(file)
end
module Webrat module Webrat
class Session class Session
include Merb::Test::RequestHelper include Merb::Test::RequestHelper