webmock 1.17.3 → 1.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.17.4
4
+
5
+ * Update matchers for RSpec 3's matcher protocol
6
+
7
+ Thanks to [Rob Olson](https://github.com/robolson)
8
+
3
9
  ## 1.17.3
4
10
 
5
11
  * Fixed issue with Rack response removing 'Content-Type' header
data/README.md CHANGED
@@ -881,6 +881,7 @@ People who submitted patches and new features or suggested improvements. Many th
881
881
  * Praveen Arimbrathodiyil
882
882
  * Bo Jeanes
883
883
  * Matthew Conway
884
+ * Rob Olson
884
885
 
885
886
  For a full list of contributors you can visit the
886
887
  [contributors](https://github.com/bblimke/webmock/contributors) page.
@@ -71,7 +71,7 @@ module WebMock
71
71
 
72
72
  def assert_request_not_requested(request, options = {})
73
73
  verifier = WebMock::RequestExecutionVerifier.new(request, options.delete(:times))
74
- WebMock::AssertionFailure.failure(verifier.negative_failure_message) unless verifier.does_not_match?
74
+ WebMock::AssertionFailure.failure(verifier.failure_message_when_negated) unless verifier.does_not_match?
75
75
  end
76
76
 
77
77
  #this is a based on RSpec::Mocks::ArgumentMatchers#anythingize_lonely_keys
@@ -32,7 +32,7 @@ module WebMock
32
32
  text
33
33
  end
34
34
 
35
- def negative_failure_message
35
+ def failure_message_when_negated
36
36
  text = if @expected_times_executed
37
37
  %Q(The request #{request_pattern.to_s} was not expected to execute #{times(expected_times_executed)} but it executed #{times(times_executed)})
38
38
  else
@@ -34,9 +34,11 @@ module WebMock
34
34
  @request_execution_verifier.failure_message
35
35
  end
36
36
 
37
-
38
- def negative_failure_message
39
- @request_execution_verifier.negative_failure_message
37
+ def failure_message_when_negated
38
+ @request_execution_verifier.failure_message_when_negated
40
39
  end
40
+
41
+ # RSpec 2 compatibility:
42
+ alias_method :negative_failure_message, :failure_message_when_negated
41
43
  end
42
44
  end
@@ -38,9 +38,11 @@ module WebMock
38
38
  @request_execution_verifier.failure_message
39
39
  end
40
40
 
41
-
42
- def negative_failure_message
43
- @request_execution_verifier.negative_failure_message
41
+ def failure_message_when_negated
42
+ @request_execution_verifier.failure_message_when_negated
44
43
  end
44
+
45
+ # RSpec 2 compatibility:
46
+ alias_method :negative_failure_message, :failure_message_when_negated
45
47
  end
46
48
  end
@@ -1,3 +1,3 @@
1
1
  module WebMock
2
- VERSION = '1.17.3' unless defined?(::WebMock::VERSION)
2
+ VERSION = '1.17.4' unless defined?(::WebMock::VERSION)
3
3
  end
@@ -37,14 +37,14 @@ describe WebMock::RequestExecutionVerifier do
37
37
  @verifier.expected_times_executed = 2
38
38
  expected_text = "The request www.example.com was not expected to execute 2 times but it executed 2 times"
39
39
  expected_text << @executed_requests_info
40
- @verifier.negative_failure_message.should == expected_text
40
+ @verifier.failure_message_when_negated.should == expected_text
41
41
  end
42
42
 
43
43
  it "should report failure message when not expected request but it executed" do
44
44
  @verifier.times_executed = 1
45
45
  expected_text = "The request www.example.com was expected to execute 0 times but it executed 1 time"
46
46
  expected_text << @executed_requests_info
47
- @verifier.negative_failure_message.should == expected_text
47
+ @verifier.failure_message_when_negated.should == expected_text
48
48
  end
49
49
 
50
50
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmock
3
3
  version: !ruby/object:Gem::Version
4
- hash: 85
4
+ hash: 91
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 17
9
- - 3
10
- version: 1.17.3
9
+ - 4
10
+ version: 1.17.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bartosz Blimke
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-02-12 00:00:00 +01:00
18
+ date: 2014-03-02 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency