Sha256: 9db3b6822de7fda3dbd8d715691114845321507bde762d28fa94ec8aa7afc3e1
Contents?: true
Size: 746 Bytes
Versions: 5
Compression:
Stored size: 746 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 def access_token 'test_access_token' end class Test::Unit::TestCase def teardown FakeWeb.clean_registry end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bitly-0.10.4 | test/test_helper.rb |
bitly-0.10.3 | test/test_helper.rb |
bitly-0.10.2 | test/test_helper.rb |
bitly-0.10.1 | test/test_helper.rb |
bitly-0.10.0 | test/test_helper.rb |