webmock 1.20.3 → 1.20.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/README.md +21 -22
  3. data/lib/webmock/matchers/hash_including_matcher.rb +1 -1
  4. data/lib/webmock/version.rb +1 -1
  5. data/spec/acceptance/curb/curb_spec.rb +36 -36
  6. data/spec/acceptance/em_http_request/em_http_request_spec.rb +24 -24
  7. data/spec/acceptance/excon/excon_spec.rb +11 -11
  8. data/spec/acceptance/httpclient/httpclient_spec.rb +9 -9
  9. data/spec/acceptance/net_http/net_http_shared.rb +23 -23
  10. data/spec/acceptance/net_http/net_http_spec.rb +29 -29
  11. data/spec/acceptance/patron/patron_spec.rb +11 -11
  12. data/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +29 -29
  13. data/spec/acceptance/shared/callbacks.rb +18 -18
  14. data/spec/acceptance/shared/complex_cross_concern_behaviors.rb +3 -3
  15. data/spec/acceptance/shared/enabling_and_disabling_webmock.rb +10 -10
  16. data/spec/acceptance/shared/precedence_of_stubs.rb +2 -2
  17. data/spec/acceptance/shared/request_expectations.rb +302 -302
  18. data/spec/acceptance/shared/returning_declared_responses.rb +92 -92
  19. data/spec/acceptance/shared/stubbing_requests.rb +103 -103
  20. data/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +8 -8
  21. data/spec/quality_spec.rb +3 -3
  22. data/spec/spec_helper.rb +0 -6
  23. data/spec/unit/errors_spec.rb +16 -16
  24. data/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +1 -1
  25. data/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +2 -2
  26. data/spec/unit/rack_response_spec.rb +14 -14
  27. data/spec/unit/request_execution_verifier_spec.rb +31 -31
  28. data/spec/unit/request_pattern_spec.rb +202 -197
  29. data/spec/unit/request_registry_spec.rb +10 -9
  30. data/spec/unit/request_signature_spec.rb +21 -20
  31. data/spec/unit/request_stub_spec.rb +54 -53
  32. data/spec/unit/response_spec.rb +44 -44
  33. data/spec/unit/stub_registry_spec.rb +15 -15
  34. data/spec/unit/stub_request_snippet_spec.rb +8 -8
  35. data/spec/unit/util/hash_counter_spec.rb +6 -6
  36. data/spec/unit/util/hash_keys_stringifier_spec.rb +1 -1
  37. data/spec/unit/util/headers_spec.rb +4 -4
  38. data/spec/unit/util/json_spec.rb +1 -1
  39. data/spec/unit/util/uri_spec.rb +30 -30
  40. data/spec/unit/util/version_checker_spec.rb +9 -9
  41. data/spec/unit/webmock_spec.rb +1 -1
  42. data/webmock.gemspec +1 -1
  43. metadata +10 -9
@@ -4,55 +4,55 @@ module WebMock
4
4
  describe VersionChecker do
5
5
  it 'prints a warning if the major version is too low' do
6
6
  checker = VersionChecker.new('foo', '0.7.3', '1.0.0', '1.1')
7
- Kernel.should_receive(:warn).with("\e[31mYou are using foo 0.7.3. WebMock supports version >= 1.0.0, < 1.2.\e[0m")
7
+ expect(Kernel).to receive(:warn).with("\e[31mYou are using foo 0.7.3. WebMock supports version >= 1.0.0, < 1.2.\e[0m")
8
8
  checker.check_version!
9
9
  end
10
10
 
11
11
  it 'prints a warning if the minor version is too low' do
12
12
  checker = VersionChecker.new('foo', '1.0.99', '1.1.3', '1.2')
13
- Kernel.should_receive(:warn).with("\e[31mYou are using foo 1.0.99. WebMock supports version >= 1.1.3, < 1.3.\e[0m")
13
+ expect(Kernel).to receive(:warn).with("\e[31mYou are using foo 1.0.99. WebMock supports version >= 1.1.3, < 1.3.\e[0m")
14
14
  checker.check_version!
15
15
  end
16
16
 
17
17
  it 'prints a warning if the patch version is too low' do
18
18
  checker = VersionChecker.new('foo', '1.0.8', '1.0.10', '1.2')
19
- Kernel.should_receive(:warn).with("\e[31mYou are using foo 1.0.8. WebMock supports version >= 1.0.10, < 1.3.\e[0m")
19
+ expect(Kernel).to receive(:warn).with("\e[31mYou are using foo 1.0.8. WebMock supports version >= 1.0.10, < 1.3.\e[0m")
20
20
  checker.check_version!
21
21
  end
22
22
 
23
23
  it 'prints a warning if the patch version is too low and max version is not specified' do
24
24
  checker = VersionChecker.new('foo', '1.0.8', '1.0.10')
25
- Kernel.should_receive(:warn).with("\e[31mYou are using foo 1.0.8. WebMock supports version >= 1.0.10.\e[0m")
25
+ expect(Kernel).to receive(:warn).with("\e[31mYou are using foo 1.0.8. WebMock supports version >= 1.0.10.\e[0m")
26
26
  checker.check_version!
27
27
  end
28
28
 
29
29
  it 'prints a warning if the major version is too high' do
30
30
  checker = VersionChecker.new('foo', '2.0.0', '1.0.0', '1.1')
31
- Kernel.should_receive(:warn).with(/may not work with this version/)
31
+ expect(Kernel).to receive(:warn).with(/may not work with this version/)
32
32
  checker.check_version!
33
33
  end
34
34
 
35
35
  it 'prints a warning if the minor version is too high' do
36
36
  checker = VersionChecker.new('foo', '1.2.0', '1.0.0', '1.1')
37
- Kernel.should_receive(:warn).with(/may not work with this version/)
37
+ expect(Kernel).to receive(:warn).with(/may not work with this version/)
38
38
  checker.check_version!
39
39
  end
40
40
 
41
41
  it 'does not raise an error or print a warning when the major version is between the min and max' do
42
42
  checker = VersionChecker.new('foo', '2.0.0', '1.0.0', '3.0')
43
- Kernel.should_not_receive(:warn)
43
+ expect(Kernel).not_to receive(:warn)
44
44
  checker.check_version!
45
45
  end
46
46
 
47
47
  it 'does not raise an error or print a warning when the min_patch is 0.6.5, the max_minor is 0.7 and the version is 0.7.3' do
48
48
  checker = VersionChecker.new('foo', '0.7.3', '0.6.5', '0.7')
49
- Kernel.should_not_receive(:warn)
49
+ expect(Kernel).not_to receive(:warn)
50
50
  checker.check_version!
51
51
  end
52
52
 
53
53
  it 'does not raise an error or print a warning when the min_patch is 0.6.5, the max_minor is not specified and the version is 0.8.3' do
54
54
  checker = VersionChecker.new('foo', '0.8.3', '0.6.5')
55
- Kernel.should_not_receive(:warn)
55
+ expect(Kernel).not_to receive(:warn)
56
56
  checker.check_version!
57
57
  end
58
58
  end
@@ -2,6 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  describe "WebMock version" do
4
4
  it "should report version" do
5
- WebMock.version.should == WebMock::VERSION
5
+ expect(WebMock.version).to eq(WebMock::VERSION)
6
6
  end
7
7
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency 'addressable', '>= 2.3.6'
19
19
  s.add_dependency 'crack', '>=0.3.2'
20
20
 
21
- s.add_development_dependency 'rspec', '~> 2.10'
21
+ s.add_development_dependency 'rspec', '>= 3.1.0'
22
22
  s.add_development_dependency 'http', '>= 0.6.0'
23
23
  s.add_development_dependency 'httpclient', '>= 2.2.4'
24
24
  s.add_development_dependency 'patron', '>= 0.4.18' unless RUBY_PLATFORM =~ /java/
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: 65
4
+ hash: 79
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 20
9
- - 3
10
- version: 1.20.3
9
+ - 4
10
+ version: 1.20.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-11-05 00:00:00 +01:00
18
+ date: 2014-11-09 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -55,13 +55,14 @@ dependencies:
55
55
  version_requirements: &id003 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
- - - ~>
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- hash: 23
60
+ hash: 3
61
61
  segments:
62
- - 2
63
- - 10
64
- version: "2.10"
62
+ - 3
63
+ - 1
64
+ - 0
65
+ version: 3.1.0
65
66
  prerelease: false
66
67
  requirement: *id003
67
68
  name: rspec