added rspec unit tests