-
-
Save wflanagan/59f0434d11079ace97ed4679d503d31d to your computer and use it in GitHub Desktop.
Retrieve only once example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.describe 'example' do | |
kinds.each do |kind| | |
context kind.to_s, vcr: true do | |
let(:helper) do | |
helper = HTTP.get("http://#{kind}.com/") | |
helper | |
end | |
# retrieves here | |
it "ok?" do | |
expect(helper.code).to eq 200 | |
end | |
# re-retrieves here | |
it 'has_items' do | |
expect(helper.items.length).to be > 0 | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment