2008-12-06 19:41:23 -05:00
|
|
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'httparty')
|
2009-09-08 21:41:13 -04:00
|
|
|
require 'spec/autorun'
|
2009-08-22 21:14:32 -04:00
|
|
|
require 'fakeweb'
|
|
|
|
|
2008-12-06 19:41:23 -05:00
|
|
|
def file_fixture(filename)
|
|
|
|
open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")).read
|
|
|
|
end
|
|
|
|
|
2010-01-29 15:20:15 -05:00
|
|
|
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
|
2008-12-22 14:30:31 -05:00
|
|
|
|
2010-01-29 15:20:15 -05:00
|
|
|
Spec::Runner.configure do |config|
|
|
|
|
config.include HTTParty::StubResponse
|
2010-05-13 21:48:42 -04:00
|
|
|
config.before(:suite) do
|
|
|
|
FakeWeb.allow_net_connect = false
|
|
|
|
end
|
|
|
|
config.after(:suite) do
|
|
|
|
FakeWeb.allow_net_connect = true
|
|
|
|
end
|
2009-11-09 22:09:03 -05:00
|
|
|
end
|