Update segments.js
created tests for listing model
Merge pull request #45 from sgray11/rspec_testing

Rspec testing
refactored based on Abi's code review
Merge pull request #47 from sgray11/code_review

refactored based on Abi's code review
fixed merge conflicts