1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Only disable net connections during the spec suite

This commit is contained in:
Sandro Turriate 2010-05-13 21:48:42 -04:00
parent afb0c8ccde
commit acb95ec1a8

View file

@ -2,8 +2,6 @@ require File.join(File.dirname(__FILE__), '..', 'lib', 'httparty')
require 'spec/autorun'
require 'fakeweb'
FakeWeb.allow_net_connect = false
def file_fixture(filename)
open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")).read
end
@ -12,4 +10,10 @@ Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].e
Spec::Runner.configure do |config|
config.include HTTParty::StubResponse
config.before(:suite) do
FakeWeb.allow_net_connect = false
end
config.after(:suite) do
FakeWeb.allow_net_connect = true
end
end