Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix the way we override the webmock stubbing instructions.

  • Loading branch information...
commit 7f95cf8bb2671f8e595e639de94c79586541a7bf 1 parent 13b66dd
@myronmarston authored
View
6 lib/vcr/http_stubbing_adapters/common.rb
@@ -11,12 +11,14 @@ module Common
def self.add_vcr_info_to_exception_message(exception_klass)
exception_klass.class_eval do
def message
- super + ". You can use VCR to automatically record this request and replay it later. " +
- "For more details, visit the VCR wiki at: http://github.com/myronmarston/vcr/wiki"
+ super + ". " + VCR::HttpStubbingAdapters::Common::RECORDING_INSTRUCTIONS
end
end
end
+ RECORDING_INSTRUCTIONS = "You can use VCR to automatically record this request and replay it later. " +
+ "For more details, visit the VCR wiki at: http://github.com/myronmarston/vcr/wiki"
+
def check_version!
version_too_low, version_too_high = compare_version
View
7 lib/vcr/http_stubbing_adapters/webmock.rb
@@ -94,5 +94,8 @@ def checkpoints
VCR.record_http_interaction(http_interaction)
end
-VCR::HttpStubbingAdapters::Common.add_vcr_info_to_exception_message(WebMock::NetConnectNotAllowedError)
-
+WebMock::NetConnectNotAllowedError.class_eval do
+ def stubbing_instructions(*args)
+ '. ' + VCR::HttpStubbingAdapters::Common::RECORDING_INSTRUCTIONS
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.