Sha256: 944e573563fd2a030127fdf3c91cd3b7698558e21583ec4cc9cabf957b412aef

Contents?: true

Size: 507 Bytes

Versions: 9

Compression:

Stored size: 507 Bytes

Contents

ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'webmock'
WebMock.disable_net_connect!
require 'muack'

class ActiveSupport::TestCase
  include WebMock::API
  include Muack::API

  teardown do
    WebMock.reset!
    Muack.verify
  end

  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

9 entries across 9 versions & 1 rubygems

Version Path
rest-more-3.4.0 example/rails3/test/test_helper.rb
rest-more-3.3.4 example/rails3/test/test_helper.rb
rest-more-3.3.3 example/rails3/test/test_helper.rb
rest-more-3.3.2 example/rails3/test/test_helper.rb
rest-more-3.3.1 example/rails3/test/test_helper.rb
rest-more-3.3.0 example/rails3/test/test_helper.rb
rest-more-3.2.0 example/rails3/test/test_helper.rb
rest-more-3.1.0 example/rails3/test/test_helper.rb
rest-more-3.0.0 example/rails3/test/test_helper.rb