added rspec tests