Added rspec tests and rake task