-
Notifications
You must be signed in to change notification settings - Fork 10
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
Capybara integration tests not working #3
Comments
Hm so it seems like you are using $stdin (or the methods that use it like gets) in the tests, or maybe Capybara is. I want to fix this, is it possible for you to provide a small example app I can use to reproduce this? |
I think I know how to fix this, but I still wonder why your test is using stdin. Could you show me the code of this after hook that is failing? |
Can you try the 0.0.10.rc1 version I just released?
You will probably get a different error or it will work. |
any luck? |
fixed in 0.0.10. |
Hm, there are still fails, but don't know what is the cause, the screen session closes immediately after the results are displayed. Any way to delay screen termination? |
Hm it's weird that it closes, that should be prevented by the read command here https://github.com/mrbrdo/theine/blob/master/lib/theine/server.rb#L32 |
Also you can try https://blogs.oracle.com/samf/entry/smcup_rmcup_hate this will make it so that after the screen terminates you will still see the last output a little above. (note: I had to remove some backslashes from that code for it to work) |
PS: I was not able to reproduce not getting the exit prompt (Press [Enter] to exit...), when specs are failing or passing. |
Just released 0.0.11 which does this automatically (show output even after screen exits). |
https://blogs.oracle.com/samf/entry/smcup_rmcup_hate didn't help, but
but moving capybara-screenshot above rspec/rails helped and tests pass. Thanks for the support! |
That is great news. Is it possible to give more info about this capybara-screenshot problem? Is there something I can do in theine to avoid this being a problem or was it just a problem with your code? |
It was a problem of require order in spec_helper. Found this thread mattheworiordan/capybara-screenshot#54 - other people had the same problem and they probably didn't use theine, so I think everything is good now. |
Actually I think there is a problem, when I move BTW: require order is a huge fail ... :/ |
Just to confirm, when you run normally using rspec without theine it works fine? |
Yes |
just wanna let you know that I didn't forget about this, just need to find some time to get to it |
Sure, no worries, I'm also short on time. |
@BartlomiejSkwira can you please check if 0.0.13 changed anything? Using "theine rspec" or "theine rake spec" command. Before it was using the development environment instead of test. |
Upgraded the gem to 0.013 and tried to use it with 2 jruby projects but I keep getting:
|
You probably need to install screen. |
Yeap sorry, forgot about screen in this env. The problem with capybara screenshot stayed: https://gist.github.com/BartlomiejSkwira/7718985 Jan |
@BartlomiejSkwira I know this is very late, but I had some time to work on merging theine into spring (the official rails preloader). I wonder if that helps with your issue. I only tried it with JRuby 9.0.3.0, though. |
Running model tests works, but when I try to run a Capybara/Poltergeist integration test I get exception:
The text was updated successfully, but these errors were encountered: