Skip to content

Add Tests #2

@nimir

Description

@nimir

Description

We need to add test coverage to ensure reliability and stability.
Let's start with simple tests coverage to verify main API interactions.

Following the approach used in ruby-openai, we can use recorded API responses as fixtures using VCR.

Test Dependencies

We will use the following gems:
RSpec – for writing and running tests
VCR – for recording and replaying API responses
WebMock – for intercepting and mocking HTTP requests

Tasks
• Set up RSpec as the test framework.
• Integrate VCR to record and replay API responses.
• Use WebMock to stub HTTP requests.
• Write tests for core functionalities of the gem.
• Ensure tests cover various edge cases and expected failures.
• Add a simple GitHub Actions workflow for automated testing (Bonus).

Expected Outcome
• A well-tested codebase with clear coverage.
• Confidence in making future changes without breaking functionality.
• Easy-to-run test suite for contributors.

Note

I plan to add this when I can, but it might not be very soon. Would love contributions!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions