Add rspec tests for the new APIs