add rspec and test for get inventory