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

rspec fail if CUPRITE_DEBUG is on #50

Closed
lacostej opened this issue Feb 5, 2019 · 4 comments
Closed

rspec fail if CUPRITE_DEBUG is on #50

lacostej opened this issue Feb 5, 2019 · 4 comments

Comments

@lacostej
Copy link
Contributor

lacostej commented Feb 5, 2019

Platform: Mac
Ruby 2.5.0
Chrome

bundle exec rspec spec/unit/

Failures:

  1) Capybara::Cuprite::Browser logs requests and responses
     Failure/Error: expect(logger.string).to include("<html><head></head><body></body></html>")
       expected "" to include "<html><head></head><body></body></html>"
     # ./spec/unit/browser_spec.rb:15:in `block (2 levels) in <module:Cuprite>'

Finished in 2.7 seconds (files took 0.79745 seconds to load)
6 examples, 1 failure

Failed examples:

rspec ./spec/unit/browser_spec.rb:8 # Capybara::Cuprite::Browser logs requests and responses
@route
Copy link
Member

route commented Feb 5, 2019

I've never seen it failing on any platform, are you on mac or windows?

@lacostej
Copy link
Contributor Author

lacostej commented Feb 6, 2019

I think the issue is that the logger is redirected when CUPRITE_DEBUG is on and the test is unable to read from the logger anymore.

@route
Copy link
Member

route commented Feb 11, 2019

I think if someone set logger we should prioritize it as they expect output to be there. They expect debug info to be in that IO so that CUPRITE_DEBUG is redundant as it eventually is the same but right on STDOUT

@route
Copy link
Member

route commented Feb 11, 2019

Fixed in e815650

@route route closed this as completed Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants