Sha256: 9d0a01e7dcd06ae1b58a10a0d81c639b55f939e8c1efa1483b0f4298f94191e9
Contents?: true
Size: 840 Bytes
Versions: 1
Compression:
Stored size: 840 Bytes
Contents
require 'rubygems' require 'test/unit' require 'shoulda' require 'mocha' require 'matchy' require 'fakeweb' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'textmagic' class Test::Unit::TestCase end def random_string(legth = 5) rand(36 ** legth).to_s(36) end def random_phone rand(10 ** 12).to_s end def random_hash hash = {} 3.times { hash[random_string] = random_string } hash end def build_uri(command, username, password, options = {}) options.merge!(:cmd => command, :username => username, :password => password) uri = "https://www.textmagic.com:443/app/api?" uri << options.collect { |key, value| "#{key}=#{value}"}.join('&') end def load_response(filename) File.read(File.join(File.dirname(__FILE__), 'fixtures', filename) + '.json') end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bobes-textmagic-0.1.0 | test/test_helper.rb |