mockserver-client 5.3.0 → 6.0.0

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.
Files changed (96) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +2 -5
  3. data/README.md +88 -96
  4. data/lib/mockserver/client.rb +518 -0
  5. data/lib/mockserver/errors.rb +18 -0
  6. data/lib/mockserver/forward_chain_expectation.rb +117 -0
  7. data/lib/mockserver/models.rb +1507 -0
  8. data/lib/mockserver/version.rb +5 -0
  9. data/lib/mockserver/websocket_client.rb +353 -0
  10. data/lib/mockserver-client.rb +8 -64
  11. data/mockserver-client.gemspec +35 -44
  12. metadata +37 -256
  13. data/Gemfile.lock +0 -79
  14. data/Rakefile +0 -10
  15. data/docs/Body.md +0 -7
  16. data/docs/BodyWithContentType.md +0 -7
  17. data/docs/ConnectionOptions.md +0 -12
  18. data/docs/ControlApi.md +0 -269
  19. data/docs/Delay.md +0 -9
  20. data/docs/Expectation.md +0 -7
  21. data/docs/ExpectationApi.md +0 -51
  22. data/docs/Expectations.md +0 -7
  23. data/docs/HttpClassCallback.md +0 -8
  24. data/docs/HttpError.md +0 -10
  25. data/docs/HttpForward.md +0 -11
  26. data/docs/HttpObjectCallback.md +0 -8
  27. data/docs/HttpOverrideForwardedRequest.md +0 -9
  28. data/docs/HttpRequest.md +0 -15
  29. data/docs/HttpResponse.md +0 -14
  30. data/docs/HttpTemplate.md +0 -10
  31. data/docs/KeyToMultiValue.md +0 -7
  32. data/docs/KeyToValue.md +0 -7
  33. data/docs/Ports.md +0 -8
  34. data/docs/TimeToLive.md +0 -10
  35. data/docs/Times.md +0 -9
  36. data/docs/Verification.md +0 -9
  37. data/docs/VerificationSequence.md +0 -8
  38. data/docs/VerificationTimes.md +0 -9
  39. data/docs/VerifyApi.md +0 -94
  40. data/lib/mockserver-client/api/control_api.rb +0 -316
  41. data/lib/mockserver-client/api/expectation_api.rb +0 -73
  42. data/lib/mockserver-client/api/verify_api.rb +0 -127
  43. data/lib/mockserver-client/api_client.rb +0 -388
  44. data/lib/mockserver-client/api_error.rb +0 -38
  45. data/lib/mockserver-client/configuration.rb +0 -202
  46. data/lib/mockserver-client/models/body.rb +0 -174
  47. data/lib/mockserver-client/models/body_with_content_type.rb +0 -174
  48. data/lib/mockserver-client/models/connection_options.rb +0 -219
  49. data/lib/mockserver-client/models/delay.rb +0 -192
  50. data/lib/mockserver-client/models/expectation.rb +0 -174
  51. data/lib/mockserver-client/models/expectations.rb +0 -174
  52. data/lib/mockserver-client/models/http_class_callback.rb +0 -183
  53. data/lib/mockserver-client/models/http_error.rb +0 -201
  54. data/lib/mockserver-client/models/http_forward.rb +0 -244
  55. data/lib/mockserver-client/models/http_object_callback.rb +0 -183
  56. data/lib/mockserver-client/models/http_override_forwarded_request.rb +0 -192
  57. data/lib/mockserver-client/models/http_request.rb +0 -246
  58. data/lib/mockserver-client/models/http_response.rb +0 -237
  59. data/lib/mockserver-client/models/http_template.rb +0 -235
  60. data/lib/mockserver-client/models/key_to_multi_value.rb +0 -174
  61. data/lib/mockserver-client/models/key_to_value.rb +0 -174
  62. data/lib/mockserver-client/models/ports.rb +0 -185
  63. data/lib/mockserver-client/models/time_to_live.rb +0 -235
  64. data/lib/mockserver-client/models/times.rb +0 -192
  65. data/lib/mockserver-client/models/verification.rb +0 -192
  66. data/lib/mockserver-client/models/verification_sequence.rb +0 -185
  67. data/lib/mockserver-client/models/verification_times.rb +0 -192
  68. data/lib/mockserver-client/version.rb +0 -15
  69. data/spec/api/control_api_spec.rb +0 -102
  70. data/spec/api/expectation_api_spec.rb +0 -46
  71. data/spec/api/verify_api_spec.rb +0 -57
  72. data/spec/api_client_spec.rb +0 -226
  73. data/spec/configuration_spec.rb +0 -42
  74. data/spec/models/body_spec.rb +0 -35
  75. data/spec/models/body_with_content_type_spec.rb +0 -35
  76. data/spec/models/connection_options_spec.rb +0 -65
  77. data/spec/models/delay_spec.rb +0 -47
  78. data/spec/models/expectation_spec.rb +0 -35
  79. data/spec/models/expectations_spec.rb +0 -35
  80. data/spec/models/http_class_callback_spec.rb +0 -41
  81. data/spec/models/http_error_spec.rb +0 -53
  82. data/spec/models/http_forward_spec.rb +0 -63
  83. data/spec/models/http_object_callback_spec.rb +0 -41
  84. data/spec/models/http_override_forwarded_request_spec.rb +0 -47
  85. data/spec/models/http_request_spec.rb +0 -83
  86. data/spec/models/http_response_spec.rb +0 -77
  87. data/spec/models/http_template_spec.rb +0 -57
  88. data/spec/models/key_to_multi_value_spec.rb +0 -35
  89. data/spec/models/key_to_value_spec.rb +0 -35
  90. data/spec/models/ports_spec.rb +0 -41
  91. data/spec/models/time_to_live_spec.rb +0 -57
  92. data/spec/models/times_spec.rb +0 -47
  93. data/spec/models/verification_sequence_spec.rb +0 -41
  94. data/spec/models/verification_spec.rb +0 -47
  95. data/spec/models/verification_times_spec.rb +0 -47
  96. data/spec/spec_helper.rb +0 -111
@@ -1,57 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::HttpTemplate
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'HttpTemplate' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::HttpTemplate.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of HttpTemplate' do
31
- it 'should create an instance of HttpTemplate' do
32
- expect(@instance).to be_instance_of(MockServer::HttpTemplate)
33
- end
34
- end
35
- describe 'test attribute "template_type"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["JAVASCRIPT", "VELOCITY"])
39
- # validator.allowable_values.each do |value|
40
- # expect { @instance.template_type = value }.not_to raise_error
41
- # end
42
- end
43
- end
44
-
45
- describe 'test attribute "template"' do
46
- it 'should work' do
47
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
- end
49
- end
50
-
51
- describe 'test attribute "delay"' do
52
- it 'should work' do
53
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
- end
55
- end
56
-
57
- end
@@ -1,35 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::KeyToMultiValue
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'KeyToMultiValue' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::KeyToMultiValue.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of KeyToMultiValue' do
31
- it 'should create an instance of KeyToMultiValue' do
32
- expect(@instance).to be_instance_of(MockServer::KeyToMultiValue)
33
- end
34
- end
35
- end
@@ -1,35 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::KeyToValue
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'KeyToValue' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::KeyToValue.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of KeyToValue' do
31
- it 'should create an instance of KeyToValue' do
32
- expect(@instance).to be_instance_of(MockServer::KeyToValue)
33
- end
34
- end
35
- end
@@ -1,41 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::Ports
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'Ports' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::Ports.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of Ports' do
31
- it 'should create an instance of Ports' do
32
- expect(@instance).to be_instance_of(MockServer::Ports)
33
- end
34
- end
35
- describe 'test attribute "ports"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- end
@@ -1,57 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::TimeToLive
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'TimeToLive' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::TimeToLive.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of TimeToLive' do
31
- it 'should create an instance of TimeToLive' do
32
- expect(@instance).to be_instance_of(MockServer::TimeToLive)
33
- end
34
- end
35
- describe 'test attribute "time_unit"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["HOURS", "MINUTES", "SECONDS", "MILLISECONDS", "MICROSECONDS", "NANOSECONDS"])
39
- # validator.allowable_values.each do |value|
40
- # expect { @instance.time_unit = value }.not_to raise_error
41
- # end
42
- end
43
- end
44
-
45
- describe 'test attribute "time_to_live"' do
46
- it 'should work' do
47
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
- end
49
- end
50
-
51
- describe 'test attribute "unlimited"' do
52
- it 'should work' do
53
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
- end
55
- end
56
-
57
- end
@@ -1,47 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::Times
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'Times' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::Times.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of Times' do
31
- it 'should create an instance of Times' do
32
- expect(@instance).to be_instance_of(MockServer::Times)
33
- end
34
- end
35
- describe 'test attribute "remaining_times"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "unlimited"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end
@@ -1,41 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::VerificationSequence
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'VerificationSequence' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::VerificationSequence.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of VerificationSequence' do
31
- it 'should create an instance of VerificationSequence' do
32
- expect(@instance).to be_instance_of(MockServer::VerificationSequence)
33
- end
34
- end
35
- describe 'test attribute "http_requests"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- end
@@ -1,47 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::Verification
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'Verification' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::Verification.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of Verification' do
31
- it 'should create an instance of Verification' do
32
- expect(@instance).to be_instance_of(MockServer::Verification)
33
- end
34
- end
35
- describe 'test attribute "http_request"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "times"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end
@@ -1,47 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for MockServer::VerificationTimes
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'VerificationTimes' do
21
- before do
22
- # run before each test
23
- @instance = MockServer::VerificationTimes.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of VerificationTimes' do
31
- it 'should create an instance of VerificationTimes' do
32
- expect(@instance).to be_instance_of(MockServer::VerificationTimes)
33
- end
34
- end
35
- describe 'test attribute "count"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "exact"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end
data/spec/spec_helper.rb DELETED
@@ -1,111 +0,0 @@
1
- =begin
2
- #Mock Server API
3
-
4
- #MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
5
-
6
- OpenAPI spec version: 5.3.0
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.1
10
-
11
- =end
12
-
13
- # load the gem
14
- require 'mockserver-client'
15
-
16
- # The following was generated by the `rspec --init` command. Conventionally, all
17
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
18
- # The generated `.rspec` file contains `--require spec_helper` which will cause
19
- # this file to always be loaded, without a need to explicitly require it in any
20
- # files.
21
- #
22
- # Given that it is always loaded, you are encouraged to keep this file as
23
- # light-weight as possible. Requiring heavyweight dependencies from this file
24
- # will add to the boot time of your test suite on EVERY test run, even for an
25
- # individual file that may not need all of that loaded. Instead, consider making
26
- # a separate helper file that requires the additional dependencies and performs
27
- # the additional setup, and require it from the spec files that actually need
28
- # it.
29
- #
30
- # The `.rspec` file also contains a few flags that are not defaults but that
31
- # users commonly want.
32
- #
33
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
34
- RSpec.configure do |config|
35
- # rspec-expectations config goes here. You can use an alternate
36
- # assertion/expectation library such as wrong or the stdlib/minitest
37
- # assertions if you prefer.
38
- config.expect_with :rspec do |expectations|
39
- # This option will default to `true` in RSpec 4. It makes the `description`
40
- # and `failure_message` of custom matchers include text for helper methods
41
- # defined using `chain`, e.g.:
42
- # be_bigger_than(2).and_smaller_than(4).description
43
- # # => "be bigger than 2 and smaller than 4"
44
- # ...rather than:
45
- # # => "be bigger than 2"
46
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
47
- end
48
-
49
- # rspec-mocks config goes here. You can use an alternate test double
50
- # library (such as bogus or mocha) by changing the `mock_with` option here.
51
- config.mock_with :rspec do |mocks|
52
- # Prevents you from mocking or stubbing a method that does not exist on
53
- # a real object. This is generally recommended, and will default to
54
- # `true` in RSpec 4.
55
- mocks.verify_partial_doubles = true
56
- end
57
-
58
- # The settings below are suggested to provide a good initial experience
59
- # with RSpec, but feel free to customize to your heart's content.
60
- =begin
61
- # These two settings work together to allow you to limit a spec run
62
- # to individual examples or groups you care about by tagging them with
63
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
64
- # get run.
65
- config.filter_run :focus
66
- config.run_all_when_everything_filtered = true
67
-
68
- # Allows RSpec to persist some state between runs in order to support
69
- # the `--only-failures` and `--next-failure` CLI options. We recommend
70
- # you configure your source control system to ignore this file.
71
- config.example_status_persistence_file_path = "spec/examples.txt"
72
-
73
- # Limits the available syntax to the non-monkey patched syntax that is
74
- # recommended. For more details, see:
75
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
76
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
77
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
78
- config.disable_monkey_patching!
79
-
80
- # This setting enables warnings. It's recommended, but in some cases may
81
- # be too noisy due to issues in dependencies.
82
- config.warnings = true
83
-
84
- # Many RSpec users commonly either run the entire suite or an individual
85
- # file, and it's useful to allow more verbose output when running an
86
- # individual spec file.
87
- if config.files_to_run.one?
88
- # Use the documentation formatter for detailed output,
89
- # unless a formatter has already been configured
90
- # (e.g. via a command-line flag).
91
- config.default_formatter = 'doc'
92
- end
93
-
94
- # Print the 10 slowest examples and example groups at the
95
- # end of the spec run, to help surface which specs are running
96
- # particularly slow.
97
- config.profile_examples = 10
98
-
99
- # Run specs in random order to surface order dependencies. If you find an
100
- # order dependency and want to debug it, you can fix the order by providing
101
- # the seed, which is printed after each run.
102
- # --seed 1234
103
- config.order = :random
104
-
105
- # Seed global randomization in this process using the `--seed` CLI option.
106
- # Setting this allows you to use `--seed` to deterministically reproduce
107
- # test failures related to randomization by passing the same `--seed` value
108
- # as the one that triggered the failure.
109
- Kernel.srand config.seed
110
- =end
111
- end