Open drobazko opened 10 years ago
UPDATE: This seems to be related to https://github.com/sporkrb/spork/issues/248 -- changes in spec output handling.
With Rails 4.1.0.beta1 and jRuby 1.7.10 on Mac OSX 10.9 I am getting the same behavior. My Gemfile.lock is here. Same behavior when I get spork-rails and spark from their respective github master branches. Thanks for any insight you can provide.
# rspec terminal session
bundle exec rspec --drb spec/models/unit_spec.rb
zsh: correct 'rspec' to 'spec' [nyae]? n
<-- Slave(2) run done!
# Spork output
[master][~/Dev/hbook] bundle exec spork
Using RSpec, Rails
-- Starting to fill pool...
Wait until at least one slave is provided before running tests...
** CTRL+BREAK to stop Spork and kill all ruby slave processes **
Spork is ready and listening on 8989!
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Running tests with args ["--color", "--profile", "--order", "random", "spec/models/unit_spec.rb"]...
<-- take tuple(2); slave.run...
-- build slave 2...
--> DRb magazine_slave_service: 2 provided...
*
Pending:
Unit add some examples to (or delete) /Users/cforcey/Dev/hbook/spec/models/unit_spec.rb
# No reason given
# ./spec/models/unit_spec.rb:4
Top 1 slowest examples (0.002 seconds, 100.0% of total time):
Unit add some examples to (or delete) /Users/cforcey/Dev/hbook/spec/models/unit_spec.rb
0.002 seconds ./spec/models/unit_spec.rb:4
Finished in 0.214 seconds
1 example, 0 failures, 1 pending
Randomized with seed 21535
-- (2);run done
Done.
I get almost the same thing, with Rails 4.0.4, rspec 3.0.0.beta2, and ruby 2.1.1p76 on a Mac.
I actually get even less output than you guys do. The spork server:
$ spork
Using RSpec, Rails
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Running tests with args ["--color", "spec"]...
Done.
Running tests with args ["--color", "spec"]...
Done.
In the terminal where I run the client:
$ rspec spec --drb
$
I have an odd wrinkle, where if I run spork -d, I get a bunch of backtraces.
The line in spec_helper which causes the backtraces is the one which loads environment.rb. When I require that file from an irb console, it is successfully executed.
this is what my spec_helper.rb looks like.
If I can be of any help debugging, please let me know.
+1
I created a stupid simple rails app to reproduce the problem.
Can somebody else run spork on this repo and confirm that they do not get output?
In the meantime, I'm working on debugging (knowing nothing about spork)
I have given up and am using zeus instead
I am also getting this. Anyone find a solution yet?
@llimllib , zeus and spring has no Windows support.
This may be a bit of a hack, but I found this to fix the stdout issue. add this to the each_run block for spork:
if Spork.using_spork?
RSpec.configure do |config|
config.reset
config.output_stream = $stdout
end
end
more info at http://stackoverflow.com/questions/22239382/how-can-i-configure-rspec-to-show-output-with-spork
I posted the question on stackoverflow. But without answer.
Rails 3.2.12 Spork 0.9.2 Rspec 2.14.1
I have a sample test spec/models/user_spec.rb
spec/spec_helper.rb
When I run the test without Spork I get:
When I run the test with Spork I get:
In Spork window:
Why does Rspec give no info about pending, failed etc tests when I use it with Spork?