Skip to content
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

Better support for testing #33

Open
doutatsu opened this issue Nov 24, 2019 · 1 comment
Open

Better support for testing #33

doutatsu opened this issue Nov 24, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@doutatsu
Copy link

As I was writing tests for the scraper I've made, I've realised its not super straightforward at the moment. It would be great to improve on that front:

  1. Add testing section to the documentation, showcasing how to set it up and test in Rails for example
  2. Expand global configuration options. I would have liked to be able to disable delay globally in the test environment, instead of doing this in every scraper I write: @config = { before_request: { delay: 1..2 } } unless Rails.env.test?
  3. Add automatic detection of the test environment. Currently I have to manually set it in the rails_helper: ENV['KIMURAI_ENV'] ||= 'test'
@rubyFeedback
Copy link

I think it may be easier to split this into separate suggestions. 3) sounds fairly easy I think, though.

@vifreefly vifreefly added the enhancement New feature or request label Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants