I have a spec like this:
我有这样的规格:
shared_examples_for 'using the id' do |the_id|
it 'should do something with the id' do
# do something with the_id
end
end
id = nil
describe 'a spec' do
it 'should retrieve id' do
id = getId
expect(id).to eq(12345)
end
include_examples 'using the id', id
end
shared_ex