CSC/ECE 517 Fall 2016/E1674.Refactor leaderboard.rb and write unit tests
This page is giving a description of the changed made for the Expertiza based OSS project.
Expertiza Background
Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). Instructor adds and edits assignment to Expertiza. And students can be assigned in team based on their selection of the topics. The Expertiza project is supported by the National Science Foundation.
Problem Statement
The task of the project is to refactor leaderboard.rb and write unit tests for it. As the names of the methods are not in a standard style, so we used snake_case for method names. There are also some useless assignments to several variables. The code climate rating of leaderboard.rb is D, which is needed to be improved.
Modified File
- leaderboard.rb
- create a RSpec file in /spec/models/ foler which contains unit test for leaderboard.rb