E1850. Write unit tests for review response map.rb team100

From Expertiza_Wiki
Revision as of 21:46, 2 November 2018 by Pchen23 (talk | contribs)
Jump to navigation Jump to search

This wiki page is for the description of unit test for E1850 OSS assignment for Fall 2018, CSC/ECE 517.

Background

Expertiza is an open source web based peer review system developed and maintained by students and faculty members at North Carolina State University. It enables students enrolled in a particular course to form online teams, complete assignments, review other's work and receive feedbacks of your work.

Problem

Review_response_map.rb is used to prepare data for peer review. But there are no unit tests for it.

Work to be done

  • Create a new file named review_response_map_spec.rb under spec/models folder
  • Write RSpec unit tests to make the path coverage above 90%.
  • Coverage as many edge cases as we can.
  • Achieve as high branch coverage as we can. Use the mutant-rspec gem to measure test thoroughness and fault-finding capability of our tests.

Files Created

  • spec/models/review_response_map_spec.rb

Unit Test

Running Rspec

The tests can be run on the terminal from inside the expertiza folder using following commands:

 rspec spec/models/review_response_map_spec.rb

Unit Test Result