Fix rspec failing test and add new tests