Sha256: 95eda02fdcf9b34e5b3979328e84e474209dda8bc70fd8960dadcd7fdff16a21

Contents?: true

Size: 855 Bytes

Versions: 6

Compression:

Stored size: 855 Bytes

Contents

$:.unshift(File.dirname(__FILE__) + '/../lib')
$:.unshift(File.dirname(__FILE__) + '/mocks')

require 'rubygems'
require 'yaml'
require 'test/unit'
require 'breakpoint'
require 'graticule'
require 'mocha'

TEST_RESPONSE_PATH = File.dirname(__FILE__) + '/fixtures/responses'

module Test
  module Unit
    module Assertions
      
      private
        def response(geocoder, response, extension = 'xml')
          clean_backtrace do
            File.read(File.dirname(__FILE__) + "/fixtures/responses/#{geocoder}/#{response}.#{extension}")
          end
        end
      
        def clean_backtrace(&block)
          yield
        rescue AssertionFailedError => e
          path = File.expand_path(__FILE__)
          raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ }
        end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
GUI-graticule-0.2.7.2 test/test_helper.rb
GUI-graticule-0.2.7.3 test/test_helper.rb
GUI-graticule-0.2.7.4 test/test_helper.rb
GUI-graticule-0.2.7.5 test/test_helper.rb
GUI-graticule-0.2.7.6 test/test_helper.rb
norman-graticule-0.2.7 test/test_helper.rb