Skip to content

Add RSpec testing infrastructure and GitHub Actions CI#1

Merged
CJGlitter merged 1 commit intomainfrom
chore/add-rspec-testing
Feb 2, 2026
Merged

Add RSpec testing infrastructure and GitHub Actions CI#1
CJGlitter merged 1 commit intomainfrom
chore/add-rspec-testing

Conversation

@CJGlitter
Copy link
Owner

Summary

  • Added comprehensive RSpec test suite (9 tests, 100% passing)
  • Configured GitHub Actions CI with parallel matrix builds for Ruby 3.0-3.4
  • Set up Bundler with development dependencies
  • Updated documentation with testing instructions

Changes

Added

  • spec/typewrite_spec.rb - Test suite covering output and timing behavior
  • spec/spec_helper.rb - RSpec configuration
  • .rspec - Default RSpec options (documentation format, color)
  • Gemfile - Development dependencies (rspec ~> 3.12, rake ~> 13.0)
  • Rakefile - Default task for running tests
  • .github/workflows/ci.yml - Parallel CI for Ruby 3.0, 3.1, 3.2, 3.3, 3.4

Updated

  • README.md - Added Development section with test instructions

Test Coverage

The test suite verifies:

  • Basic output with default parameters
  • Custom type_rate and punc_rate parameters
  • Line break behavior (true/false)
  • Punctuation pauses (., ?, !)
  • Edge cases (empty string, single character)

Manual Testing

bundle install
bundle exec rspec       # Run tests directly
bundle exec rake        # Run tests via rake

All 9 tests pass across Ruby 3.0-3.4.

CI Behavior

GitHub Actions will now:

  • Run on all PRs and pushes to main
  • Test against Ruby 3.0, 3.1, 3.2, 3.3, 3.4 in parallel
  • Fail builds if any tests don't pass
  • Cache gems for faster subsequent runs

- Add RSpec test suite with 9 passing tests covering output and timing behavior
- Configure Bundler with development dependencies (rspec, rake)
- Add Rakefile with spec as default task
- Set up GitHub Actions CI with parallel matrix builds for Ruby 3.0-3.4
- Update README.md with test instructions

Tests verify typewriter effect functionality including custom rates,
punctuation pauses, and line break options. CI runs on all PRs and
pushes to main to ensure code quality.
@CJGlitter CJGlitter merged commit a90e26d into main Feb 2, 2026
5 checks passed
@CJGlitter CJGlitter deleted the chore/add-rspec-testing branch February 2, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant