Wrote rspec test cases.