Sha256: 86f7a9c10e08cb02b4d21282110d3139ec9df9e47a4f468132c7c2c83cdfbecc

Contents?: true

Size: 904 Bytes

Versions: 2

Compression:

Stored size: 904 Bytes

Contents

require 'test/unit'
require 'pathname'
require 'rubygems'

gem 'shoulda', '>= 2.10.1'
gem 'jnunemaker-matchy', '0.4.0'
gem 'mocha', '0.9.4'
gem 'fakeweb', '>= 1.2.5'

require 'shoulda'
require 'matchy'
require 'mocha'
require 'fakeweb'


$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'authentic_jobs'

FakeWeb.allow_net_connect = false

class Test::Unit::TestCase
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, status=nil)
  options = {:body => fixture_file(filename)}
  options.merge!({:status => status}) unless status.nil?
  
  FakeWeb.register_uri(:get, url, options)
end

def stub_post(url, filename)
  FakeWeb.register_uri(:post, url, :body => fixture_file(filename))
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
authentic_jobs-0.2.0 test/helper.rb
authentic_jobs-0.1.0 test/helper.rb