Sha256: 40640e725be22a8f2a5d20b6b5219bad65ad97d9c592c4bcdf4687862ff39215

Contents?: true

Size: 266 Bytes

Versions: 4

Compression:

Stored size: 266 Bytes

Contents

require 'rest-core/test'
require 'rest-more'

module TestHelper
  module_function
  def normalize_query query
    '?' + query[1..-1].split('&').sort.join('&')
  end

  def normalize_url url
    url.sub(/\?.+/){ |query| TestHelper.normalize_query(query) }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rest-more-2.0.4 lib/rest-more/test.rb
rest-more-2.0.3 lib/rest-more/test.rb
rest-more-2.0.2 lib/rest-more/test.rb
rest-more-2.0.0 lib/rest-more/test.rb