Sinatra Basics : Test Coverage for Sinatra Applications


To learn how to setup simplecov to generate test coverage report.


Step 1

In your Gemfilefile, add the following to the test group:

gem 'simplecov'

Step 2

$bundle install

Step 3

In spec/spec_helper.rb (before anything else)

require 'simplecov'

Step 4

$rspec spec

Step 5

To view the test coverage report.

$open coverage/index.html


In this article, you learned how to use simplecov gem to generate test coverage reports for a Sinatra application.

Related Articles

Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.