Skip to content

Commit

Permalink
Use vcr to stub network requests
Browse files Browse the repository at this point in the history
there are three tests in feed_spec that require network to pass.

PR #297 fixes the immediate issue by making the test general enough to
pass when the response from the server changes somewhat.

PR #300 fixes the network issue, but uses specific stubs. I would say
this method is no better or worse than this one, however it does require
knowing that you are stubbing the request and manually keeping responses
up to date.

This method acts the most like actually hitting the network and will
work on an airplane.
  • Loading branch information
HParker committed Nov 9, 2016
1 parent 59609d7 commit 5c26c43
Show file tree
Hide file tree
Showing 6 changed files with 594 additions and 16 deletions.
1 change: 1 addition & 0 deletions feedjira.gemspec
Expand Up @@ -26,4 +26,5 @@ Gem::Specification.new do |s|
s.add_development_dependency 'danger-commit_lint'
s.add_development_dependency 'rspec', '~> 3.0'
s.add_development_dependency 'rubocop', '0.43.0'
s.add_development_dependency 'vcr', '~> 3.0.3'
end
62 changes: 62 additions & 0 deletions fixtures/vcr_cassettes/fetch_failure.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

222 changes: 222 additions & 0 deletions fixtures/vcr_cassettes/parse_error.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c26c43

Please sign in to comment.