Sha256: d54eed4f0a1d50d864c1f258b056d6fa79233b4d5725d74c21e2fb2e2511105d

Contents?: true

Size: 406 Bytes

Versions: 50

Compression:

Stored size: 406 Bytes

Contents

ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
begin
  require 'rails/test_help'
rescue LoadError # for rails2
  require 'test_help'
end

class ActiveSupport::TestCase
  def normalize_query query, amp='&'
    '?' + query[1..-1].split(amp).sort.join(amp)
  end

  def normalize_url url, amp='&'
    url.sub(/\?.+/){ |query| normalize_query(query, amp) }
  end
end

Version data entries

50 entries across 27 versions & 3 rubygems

Version Path
rest-graph-2.0.3 example/rails2/test/test_helper.rb
rest-graph-2.0.3 example/rails3/test/test_helper.rb
rest-more-2.0.4 example/rails3/test/test_helper.rb
rest-more-2.0.3 example/rails3/test/test_helper.rb
rest-more-2.0.2 example/rails3/test/test_helper.rb
rest-more-2.0.0 example/rails3/test/test_helper.rb
rest-graph-2.0.2 example/rails3/test/test_helper.rb
rest-graph-2.0.2 example/rails2/test/test_helper.rb
rest-more-1.0.2 example/rails2/test/test_helper.rb
rest-more-1.0.2 example/rails3/test/test_helper.rb
rest-more-1.0.1 example/rails3/test/test_helper.rb
rest-more-1.0.1 example/rails2/test/test_helper.rb
rest-more-1.0.0 example/rails2/test/test_helper.rb
rest-more-1.0.0 example/rails3/test/test_helper.rb
rest-more-0.8.0 example/rails3/test/test_helper.rb
rest-more-0.8.0 example/rails2/test/test_helper.rb
rest-graph-2.0.1 example/rails3/test/test_helper.rb
rest-graph-2.0.1 example/rails2/test/test_helper.rb
rest-more-0.7.2.1 example/rails3/test/test_helper.rb
rest-more-0.7.2.1 example/rails2/test/test_helper.rb