Sha256: 4c51c155c59d1ff93a4d19378b296f6268278c300dc2c89eac0db6279af5f98a

Contents?: true

Size: 744 Bytes

Versions: 7

Compression:

Stored size: 744 Bytes

Contents

# -*- encoding: utf-8 -*-

$: << File.join(File.dirname(__FILE__), "/../lib")
require 'open_uri_redirections'
require 'fakeweb'

FakeWeb.allow_net_connect = false

$samples_dir = File.dirname(__FILE__) + '/samples'

#######################
# Faked web responses #
#######################

FakeWeb.register_uri(:get, "http://safe.com/",    :response => open("#{$samples_dir}/http_safe.response").read)
FakeWeb.register_uri(:get, "https://safe.com/",   :response => open("#{$samples_dir}/https_safe.response").read)

FakeWeb.register_uri(:get, "https://unsafe.com/", :response => open("#{$samples_dir}/https_unsafe.response").read)
FakeWeb.register_uri(:get, "http://unsafe.com/",  :response => open("#{$samples_dir}/http_unsafe.response").read)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
open_uri_redirections-0.2.0 spec/spec_helper.rb
open_uri_redirections-0.1.4 spec/spec_helper.rb
open_uri_redirections-0.1.3 spec/spec_helper.rb
open_uri_redirections-0.1.2 spec/spec_helper.rb
open_uri_redirections-0.1.1 spec/spec_helper.rb
open_uri_redirections-0.1.0 spec/spec_helper.rb
open_uri_redirections-0.0.1 spec/spec_helper.rb