Added RSpec and tests