RSpec: how to delete duplicated rspec example

for instance:

class C
def m(*args, &blk)

end
end
describe “a desc” do
it “a it with same name” do
C.new.m
end

in line 523

it “a it with same name” do # it_example2
C.new.m
end
end

in another spec file

describe “a desc” do
it “a it with same name” do # it_example3
C.new.m
end
end

how to delete duplicate it examples(in above sample code, they are
it_example2 and it_example3) with some auto tool, i have try code
climate, it just check file.match([^spec]) duplication.

I fix it with below code:

require ‘term/ansicolor’
require ‘rspec’

all_example_full_descs = []
RSpec.configure do |c|
c.before do |example|
all_example_full_descs << example.metadata[:full_description]
end

c.after(:all) do
puts all_example_full_descs
end
end

describe ‘a desc’ do
10.times do
it “a it #{Time.now}” do
puts Term::ANSIColor.red(Time.now)
end
end
end