Added Rspec tests for #common_substrings