azure_openai_client 0.0.1

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 (53) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +178 -0
  3. data/lib/azure_openai_client/api/default_api.rb +232 -0
  4. data/lib/azure_openai_client/api_client.rb +390 -0
  5. data/lib/azure_openai_client/api_error.rb +58 -0
  6. data/lib/azure_openai_client/configuration.rb +214 -0
  7. data/lib/azure_openai_client/models/chat_completions_body.rb +334 -0
  8. data/lib/azure_openai_client/models/deploymentid_completions_body.rb +406 -0
  9. data/lib/azure_openai_client/models/deploymentid_embeddings_body.rb +202 -0
  10. data/lib/azure_openai_client/models/deploymentsdeploymentidchatcompletions_messages.rb +274 -0
  11. data/lib/azure_openai_client/models/error_response.rb +209 -0
  12. data/lib/azure_openai_client/models/error_response_error.rb +236 -0
  13. data/lib/azure_openai_client/models/inline_response_200.rb +281 -0
  14. data/lib/azure_openai_client/models/inline_response_200_1.rb +258 -0
  15. data/lib/azure_openai_client/models/inline_response_200_1_data.rb +244 -0
  16. data/lib/azure_openai_client/models/inline_response_200_1_usage.rb +228 -0
  17. data/lib/azure_openai_client/models/inline_response_200_2.rb +281 -0
  18. data/lib/azure_openai_client/models/inline_response_200_2_choices.rb +227 -0
  19. data/lib/azure_openai_client/models/inline_response_200_2_message.rb +264 -0
  20. data/lib/azure_openai_client/models/inline_response_200_2_usage.rb +242 -0
  21. data/lib/azure_openai_client/models/inline_response_200_choices.rb +236 -0
  22. data/lib/azure_openai_client/models/inline_response_200_logprobs.rb +244 -0
  23. data/lib/azure_openai_client/models/inline_response_200_usage.rb +242 -0
  24. data/lib/azure_openai_client/models/one_ofchat_completions_body_stop.rb +198 -0
  25. data/lib/azure_openai_client/models/one_ofdeploymentid_completions_body_prompt.rb +198 -0
  26. data/lib/azure_openai_client/models/one_ofdeploymentid_completions_body_stop.rb +198 -0
  27. data/lib/azure_openai_client/version.rb +16 -0
  28. data/lib/azure_openai_client.rb +61 -0
  29. data/spec/api/default_api_spec.rb +75 -0
  30. data/spec/api_client_spec.rb +229 -0
  31. data/spec/configuration_spec.rb +78 -0
  32. data/spec/models/chat_completions_body_spec.rb +102 -0
  33. data/spec/models/deploymentid_completions_body_spec.rb +144 -0
  34. data/spec/models/deploymentid_embeddings_body_spec.rb +36 -0
  35. data/spec/models/deploymentsdeploymentidchatcompletions_messages_spec.rb +58 -0
  36. data/spec/models/error_response_error_spec.rb +60 -0
  37. data/spec/models/error_response_spec.rb +42 -0
  38. data/spec/models/inline_response_200_1_data_spec.rb +54 -0
  39. data/spec/models/inline_response_200_1_spec.rb +60 -0
  40. data/spec/models/inline_response_200_1_usage_spec.rb +48 -0
  41. data/spec/models/inline_response_200_2_choices_spec.rb +54 -0
  42. data/spec/models/inline_response_200_2_message_spec.rb +52 -0
  43. data/spec/models/inline_response_200_2_spec.rb +72 -0
  44. data/spec/models/inline_response_200_2_usage_spec.rb +54 -0
  45. data/spec/models/inline_response_200_choices_spec.rb +60 -0
  46. data/spec/models/inline_response_200_logprobs_spec.rb +60 -0
  47. data/spec/models/inline_response_200_spec.rb +72 -0
  48. data/spec/models/inline_response_200_usage_spec.rb +54 -0
  49. data/spec/models/one_ofchat_completions_body_stop_spec.rb +36 -0
  50. data/spec/models/one_ofdeploymentid_completions_body_prompt_spec.rb +36 -0
  51. data/spec/models/one_ofdeploymentid_completions_body_stop_spec.rb +36 -0
  52. data/spec/spec_helper.rb +112 -0
  53. metadata +177 -0
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse2002Message
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse2002Message' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse2002Message.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse2002Message' do
32
+ it 'should create an instance of InlineResponse2002Message' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse2002Message)
34
+ end
35
+ end
36
+ describe 'test attribute "role"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["system", "user", "assistant"])
40
+ # validator.allowable_values.each do |value|
41
+ # expect { @instance.role = value }.not_to raise_error
42
+ # end
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "content"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse2002
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse2002' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse2002.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse2002' do
32
+ it 'should create an instance of InlineResponse2002' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse2002)
34
+ end
35
+ end
36
+ describe 'test attribute "id"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "object"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "created"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "model"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "choices"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "usage"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse2002Usage
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse2002Usage' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse2002Usage.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse2002Usage' do
32
+ it 'should create an instance of InlineResponse2002Usage' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse2002Usage)
34
+ end
35
+ end
36
+ describe 'test attribute "prompt_tokens"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "completion_tokens"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "total_tokens"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse200Choices
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse200Choices' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse200Choices.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse200Choices' do
32
+ it 'should create an instance of InlineResponse200Choices' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse200Choices)
34
+ end
35
+ end
36
+ describe 'test attribute "text"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "index"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "logprobs"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "finish_reason"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse200Logprobs
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse200Logprobs' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse200Logprobs.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse200Logprobs' do
32
+ it 'should create an instance of InlineResponse200Logprobs' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse200Logprobs)
34
+ end
35
+ end
36
+ describe 'test attribute "tokens"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "token_logprobs"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "top_logprobs"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "text_offset"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ end
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse200
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse200' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse200.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse200' do
32
+ it 'should create an instance of InlineResponse200' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse200)
34
+ end
35
+ end
36
+ describe 'test attribute "id"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "object"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "created"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "model"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "choices"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ describe 'test attribute "usage"' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::InlineResponse200Usage
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'InlineResponse200Usage' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::InlineResponse200Usage.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of InlineResponse200Usage' do
32
+ it 'should create an instance of InlineResponse200Usage' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::InlineResponse200Usage)
34
+ end
35
+ end
36
+ describe 'test attribute "completion_tokens"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "prompt_tokens"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ describe 'test attribute "total_tokens"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ end
52
+ end
53
+
54
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::OneOfchatCompletionsBodyStop
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'OneOfchatCompletionsBodyStop' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::OneOfchatCompletionsBodyStop.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of OneOfchatCompletionsBodyStop' do
32
+ it 'should create an instance of OneOfchatCompletionsBodyStop' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::OneOfchatCompletionsBodyStop)
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::OneOfdeploymentidCompletionsBodyPrompt
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'OneOfdeploymentidCompletionsBodyPrompt' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::OneOfdeploymentidCompletionsBodyPrompt.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of OneOfdeploymentidCompletionsBodyPrompt' do
32
+ it 'should create an instance of OneOfdeploymentidCompletionsBodyPrompt' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::OneOfdeploymentidCompletionsBodyPrompt)
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ require 'spec_helper'
15
+ require 'json'
16
+ require 'date'
17
+
18
+ # Unit tests for AzureOpenaiClient::OneOfdeploymentidCompletionsBodyStop
19
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
20
+ # Please update as you see appropriate
21
+ describe 'OneOfdeploymentidCompletionsBodyStop' do
22
+ before do
23
+ # run before each test
24
+ @instance = AzureOpenaiClient::OneOfdeploymentidCompletionsBodyStop.new
25
+ end
26
+
27
+ after do
28
+ # run after each test
29
+ end
30
+
31
+ describe 'test an instance of OneOfdeploymentidCompletionsBodyStop' do
32
+ it 'should create an instance of OneOfdeploymentidCompletionsBodyStop' do
33
+ expect(@instance).to be_instance_of(AzureOpenaiClient::OneOfdeploymentidCompletionsBodyStop)
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ #Azure OpenAI Service API
5
+
6
+ #Azure OpenAI APIs for completions and search
7
+
8
+ OpenAPI spec version: 2023-05-15
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 3.0.42
12
+ =end
13
+
14
+ # load the gem
15
+ require 'azure_openai_client'
16
+
17
+ # The following was generated by the `rspec --init` command. Conventionally, all
18
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
19
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
20
+ # this file to always be loaded, without a need to explicitly require it in any
21
+ # files.
22
+ #
23
+ # Given that it is always loaded, you are encouraged to keep this file as
24
+ # light-weight as possible. Requiring heavyweight dependencies from this file
25
+ # will add to the boot time of your test suite on EVERY test run, even for an
26
+ # individual file that may not need all of that loaded. Instead, consider making
27
+ # a separate helper file that requires the additional dependencies and performs
28
+ # the additional setup, and require it from the spec files that actually need
29
+ # it.
30
+ #
31
+ # The `.rspec` file also contains a few flags that are not defaults but that
32
+ # users commonly want.
33
+ #
34
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
35
+ RSpec.configure do |config|
36
+ # rspec-expectations config goes here. You can use an alternate
37
+ # assertion/expectation library such as wrong or the stdlib/minitest
38
+ # assertions if you prefer.
39
+ config.expect_with :rspec do |expectations|
40
+ # This option will default to `true` in RSpec 4. It makes the `description`
41
+ # and `failure_message` of custom matchers include text for helper methods
42
+ # defined using `chain`, e.g.:
43
+ # be_bigger_than(2).and_smaller_than(4).description
44
+ # # => "be bigger than 2 and smaller than 4"
45
+ # ...rather than:
46
+ # # => "be bigger than 2"
47
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
48
+ end
49
+
50
+ # rspec-mocks config goes here. You can use an alternate test double
51
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
52
+ config.mock_with :rspec do |mocks|
53
+ # Prevents you from mocking or stubbing a method that does not exist on
54
+ # a real object. This is generally recommended, and will default to
55
+ # `true` in RSpec 4.
56
+ mocks.verify_partial_doubles = true
57
+ end
58
+
59
+ # The settings below are suggested to provide a good initial experience
60
+ # with RSpec, but feel free to customize to your heart's content.
61
+ =begin
62
+ # These two settings work together to allow you to limit a spec run
63
+ # to individual examples or groups you care about by tagging them with
64
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
65
+ # get run.
66
+ config.filter_run :focus
67
+ config.run_all_when_everything_filtered = true
68
+
69
+ # Allows RSpec to persist some state between runs in order to support
70
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
71
+ # you configure your source control system to ignore this file.
72
+ config.example_status_persistence_file_path = "spec/examples.txt"
73
+
74
+ # Limits the available syntax to the non-monkey patched syntax that is
75
+ # recommended. For more details, see:
76
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
77
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
78
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
79
+ config.disable_monkey_patching!
80
+
81
+ # This setting enables warnings. It's recommended, but in some cases may
82
+ # be too noisy due to issues in dependencies.
83
+ config.warnings = true
84
+
85
+ # Many RSpec users commonly either run the entire suite or an individual
86
+ # file, and it's useful to allow more verbose output when running an
87
+ # individual spec file.
88
+ if config.files_to_run.one?
89
+ # Use the documentation formatter for detailed output,
90
+ # unless a formatter has already been configured
91
+ # (e.g. via a command-line flag).
92
+ config.default_formatter = 'doc'
93
+ end
94
+
95
+ # Print the 10 slowest examples and example groups at the
96
+ # end of the spec run, to help surface which specs are running
97
+ # particularly slow.
98
+ config.profile_examples = 10
99
+
100
+ # Run specs in random order to surface order dependencies. If you find an
101
+ # order dependency and want to debug it, you can fix the order by providing
102
+ # the seed, which is printed after each run.
103
+ # --seed 1234
104
+ config.order = :random
105
+
106
+ # Seed global randomization in this process using the `--seed` CLI option.
107
+ # Setting this allows you to use `--seed` to deterministically reproduce
108
+ # test failures related to randomization by passing the same `--seed` value
109
+ # as the one that triggered the failure.
110
+ Kernel.srand config.seed
111
+ =end
112
+ end