Sha256: 4b4f871b2a73b2d852e8d9c4fa169d3f4dc6a22b752c6968f61d53fbe6e1f0a1
Contents?: true
Size: 624 Bytes
Versions: 7
Compression:
Stored size: 624 Bytes
Contents
require 'test/unit' require 'rubygems' require 'shoulda' require 'flexmock/test_unit' require 'fakeweb' require File.join(File.dirname(__FILE__), '..', 'lib', 'bitly') FakeWeb.allow_net_connect = false 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, status=nil) options = {:body => fixture_file(filename)} options.merge!({:status => status}) unless status.nil? FakeWeb.register_uri(:get, url, options) end def api_key 'test_key' end def login 'test_account' end
Version data entries
7 entries across 7 versions & 3 rubygems