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

Don't redirect stdout before calling Capybara's visit method #184

Merged
merged 1 commit into from
Jul 18, 2016

Conversation

kylesmile
Copy link
Contributor

Redirecting stdout breaks using a debugging tool like pry from a controller action. Here's a small example.

I'm not sure if there's a good way to write a test for this, but suggestions are welcome.

@oriolgual
Copy link
Member

This was introduced here 9c08137#diff-ab028e449b86b3d40a35a0dc65a6a90a, @josepjaume do you remember why?

@mrcasals
Copy link
Contributor

Found this bug myself a couple of times too, actually :/

@wzcolon
Copy link

wzcolon commented Sep 22, 2015

For others, until this gets merged...

# config/initializers/spinach.rb
if Rails.env.test?
  require 'spinach/capybara'

  module Spinach
    class FeatureSteps
      module Capybara
        def visit(*args)
          capybara_visit *args
        end
      end
    end
  end
end

@alkuzad
Copy link

alkuzad commented Feb 20, 2016

👍 what is the reason for redirection ? Does capybara prints anything ?

@kylesmile
Copy link
Contributor Author

Capybara doesn't seem to print anything that I've seen. I'm wondering if Capybara was noisier when that redirection was added.

@oriolgual oriolgual merged commit 514acd7 into codegram:master Jul 18, 2016
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

Successfully merging this pull request may close these issues.

None yet

5 participants