Sha256: f682ae28de90742a47b5c0345d3771b10a5378cb8816a0140fd1b71b0db49ca9

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'
require 'rspec'
require 'fakeweb'
require 'binged'

FakeWeb.allow_net_connect = false
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}

def fixture_file(filename)
  return '' if filename == ''
  file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
  File.read(file_path)
end

def stub_get(url, filename, options={})
  fakeweb_options = {:response => fixture_file(filename)}.merge(options)
  FakeWeb.register_uri(:get, url, fakeweb_options)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
binged-1.1.0 spec/spec_helper.rb
binged-1.0.1 spec/spec_helper.rb
binged-1.0.0 spec/spec_helper.rb