Skip to content

Eye candy for RSpec: pretty progress bars and coverage reports

License

Notifications You must be signed in to change notification settings

saiden-dev/rspec-candy

Repository files navigation

RSpec::Candy

image

Gem Version CI

Eye candy for RSpec: beautiful progress bars and coverage reports.

Features

  • TTY Progress Bar - Rich progress bar with ETA, rate, and percentage
  • Colored Output - Green for pass, red for fail, yellow for pending
  • Coverage Table - Automatically displays if SimpleCov data exists
  • Non-TTY Fallback - Dots/characters when not in a terminal

Installation

Add to your Gemfile:

group :test do
  gem "rspec-candy"
end

Then:

bundle install

Usage

Add to .rspec:

--require rspec/candy
--format RSpec::Candy::Formatter

Then just run:

bundle exec rspec

You get a progress bar, test results, and coverage table (if SimpleCov is configured) - all in one.

Screenshot

Running 42 examples...

[██████████████████████████████████████░░░░░░░░░░] 38/42 90% │ 00:01

✓ 42 examples, 0 failures
Finished in 0.73s

┌─────────────┬────────┬────────────────┬───────┐
│ File        │ Lines  │ Coverage       │ %     │
├─────────────┼────────┼────────────────┼───────┤
│ cli.rb      │ 85/100 │ █████████████░ │ 85.0% │
│ builder.rb  │ 38/50  │ ███████████░░░ │ 76.0% │
│ remote.rb   │ 22/40  │ ████████░░░░░░ │ 55.0% │
└─────────────┴────────┴────────────────┴───────┘

Total: 145/190 (76.3%)
4 files at 100% (not shown)

Requirements

  • Ruby >= 3.2.0
  • RSpec >= 3.0
  • SimpleCov (for coverage reports)

License

MIT License. See LICENSE.txt.

About

Eye candy for RSpec: pretty progress bars and coverage reports

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •