-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration tests #98
Conversation
We do integration tests in Faraday and they are very useful. Yes I think we should have a stronger test suite in the light of these bugs. I would use webmock instead of fakeweb (outdated) or VCR (overkill for our purposes). |
okay, now mocked with webmock i could make a spec helper file for the integration tests… or we could keep it simple like this until the need presents itself. |
ah frack now 'helper' isn't in the load path let me know if you like the file structure and if so i'll fix the require paths |
The |
Ah I see you've moved |
@mislav fixed. see the new failures. how do we make access to those values compatible with old versions of faraday? |
end | ||
|
||
response = connection.get "http://facebook.com" | ||
expect(response.env.url.to_s).to eq("https://www.facebook.com/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response.env[:url]
@mislav fixed, and tidied up some other related stuff |
now it fails because coverage is too low… even though the only thing this PR does is add new tests, hah! |
Yeah, bizarre. Please see if there are low-hanging fruit with regards to code coverage. We could even lower the treshold but that's only a temporary solution, as future PRs will have to lower the treshold even further, and that gets us nowhere. |
cde9944
to
bee560a
Compare
I think because this PR only has new tests, a good case can be made that the coverage tool isn't correctly assessing the situation and that we should lower the threshold. |
Yep, do it. |
see discussion in: lostisland#98
initial simple test for the purpose of discussing how we might want to go about writing integration tests
see discussion in: lostisland#98
i've no idea what the cause of these new failures is... |
It picked up simple_oauth 0.3.0 when previously we used simple_oauth 0.2.0. We have to look into the incompatibilities with the new version, but for now you could just put a version constraint for |
😹 |
Thank you! Could you be bothered to look into the simple_oauth incompatibility thing or should we do it? |
i've no experience with it and don't use it so it would be hard for me to prioritize, tbh |
I think the project would benefit from integration tests. Bugs that PRs like #35, #89, and #97 would be easier to observe with integration tests.
Here is some initial simple code for the purpose of discussion. Things to consider: