I have spork running to speed up my tests but there is no output when I run them. Is there a configuration that I need to modify?
相关问题
- How to check block is called using rspec
- How to delete quotation marks in an array in Ruby
- Testing a rake task with passed parameters in rspe
- rspec - how to check that allow_blank exists
- Save_and_open_page not picking up scss markup
相关文章
- “No explicit conversion of Symbol into String” for
- Rspec controller error expecting <“index”> but
- How to use synchronize in Capybara exactly?
- Selecting a radio button with Rspec
- How to test a Singleton class?
- before(:each) for all tests except one
- Rounding problem with rspec tests when comparing f
- Why are my RSpec specs running twice?
@astgtciv already answered the question, but here's a related thing I ran into that is too long for writing as a comment:
Using @astgtciv's fix worked for me, but it broke again when I introduced a custom formatter. My guess is that the formatter is initialized when Spork boots, so its output stream is in the DRB server window instead of the test runner window.
My fix was to add
attr_accessor :output
to my custom formatter, then change the output insideSpork.each_run
, e.g:A simpler fix would be to just add the formatter inside this code block, but I thought this might be faster (in terms of test run speed) and not risk adding the same formatter multiple times. Have not verified that guess though.
Just ran into this as well, running on spork 1.0.0rc4 and rspec 2.14.1 / rspec-core 2.14.8 . As far as I could figure it out, the problem lies in the following:
Also, somehow RSpec.configuration.output_stream is never set. Bottom line, adding this code to Spork.each_run appears to fix the problem:
If anyone knows of a more elegant way to solve this, please tell!