Sha256: 6cd200a7980606dfc01e42108b838674bff538888b2dda9f7c98e1296b2cb890

Contents?: true

Size: 819 Bytes

Versions: 2

Compression:

Stored size: 819 Bytes

Contents

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

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

Spec::Runner.configure do |config|
  
end

def bing_url(url)
  "http://api.bing.net/json.aspx#{url}&Version=2.2&JsonType=raw&AppId=binged"
end

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

2 entries across 2 versions & 1 rubygems

Version Path
binged-0.3.0 spec/spec_helper.rb
binged-0.2.0 spec/spec_helper.rb