Implemented rspec tests