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:
parent
afb0c8ccde
commit
acb95ec1a8
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue