spec/spec_helper.rb in viacep-2.0.2 vs spec/spec_helper.rb in viacep-2.0.3

- old
+ new

@@ -1,8 +1,12 @@ require_relative '../lib/viacep' +require_relative './mock/request_mocker' +require 'webmock/rspec' RSpec.configure do |config| + config.include ViaCep::Test::RequestMocker + config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true expectations.syntax = :expect end @@ -10,6 +14,11 @@ mocks.verify_partial_doubles = true end config.shared_context_metadata_behavior = :apply_to_host_groups config.order = :random + + config.before(:each) do + WebMock.reset! + WebMock.disable_net_connect! + end end