refactory the rspec test group to shared_examples_for
my gsub