added rspec and written first tests

Signed-off-by: ai <ai@ai.com>