Rspec Spork Rubymine 4.0.3 - Tests completed successfuly but getting a strange message afterwards.


I somehow managed to come to a point running my tests succesfully within Rubymine 4.0.3 but getting the message below: process exited with exit code 1.
When I run rspec form the console everything is fine but within Rubymine process fails. Tried several ways but no luck.

Am I missing any point about the Run Configuration?

C:\DEV\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "C:\DEV\JetBrains\RubyMine 4.0.3\rb\testing\runner\specs_in_folder_runner.rb" --drb --backtrace
Testing started at 2:43 PM ...
Searching files....
1. C:/Users/felippe/Google Drive/RubymineProjects/Demo/spec/controllers/pages_controller_spec.rb:1

1 files were found.
RSpec script : C:\DEV\Ruby193\bin/rspec

Spec Options:
["--drb", "--backtrace"]
Running specs...
Command line:
["C:\\DEV\\Ruby193\\bin\\ruby.exe", "-e", "$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)", "C:\\DEV\\Ruby193\\bin/rspec", "--require", "teamcity/spec/runner/formatter/teamcity/formatter", "--format", "Spec::Runner::Formatter::TeamcityFormatter", "C:/Users/felippe/Google Drive/RubymineProjects/Demo/spec/controllers/pages_controller_spec.rb", "--drb", "--backtrace"]
C:\DEV\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\DEV\Ruby193\bin/rspec --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter C:/Users/felippe/Google Drive/RubymineProjects/Demo/spec/controllers/pages_controller_spec.rb --drb --backtrace

2 examples, 0 failures, 2 passed

Finished in 3.858221 seconds
  <-- Slave(1) run done!
C:/DEV/Ruby193/lib/ruby/gems/1.9.1/gems/rake- `block in create_shell_runner': Command failed with status (1): [C:\DEV\Ruby193\bin\ruby.exe -e $stdout.syn...] (RuntimeError)
 from C:/DEV/Ruby193/lib/ruby/gems/1.9.1/gems/rake- `call'
 from C:/DEV/Ruby193/lib/ruby/gems/1.9.1/gems/rake- `sh'
 from C:/DEV/Ruby193/lib/ruby/gems/1.9.1/gems/rake- `sh'
 from C:/DEV/JetBrains/RubyMine 4.0.3/rb/testing/runner/specs_in_folder_runner.rb:139:in `<top (required)>'
 from -e:1:in `load'
 from -e:1:in `<main>'

Process finished with exit code 1

Comment actions Permalink


The error message means that for some reasons rspec which was executed under Spork server returns exit code 1.
Perhaps the Spork's log contains some useful information.
Try to run rspec manually (when Sport server is running) and check if it will exit with exit code 0 or not.


Comment actions Permalink


Thanks  for the mail Oleg. The only information I have at spork log is as below. Only case I get the this message is when I run rspec within Rubymine with a --drb option.

When I run rspec manually with or without spork it is ok.
In Rubymine without spork it is ok but with spork I get that exit code in previuos message.

That is why I started to think this is something related to Rubymine if I am not missing anything with the run configuration.
I am attaching the gemfile and spec_helper in case you want to take a look.

Can it be something related to teamcity or any other default paramater used there?

Loading Spork.prefork block...
  --> DRb magazine_slave_service: 2 provided...
  --> DRb magazine_slave_service: 1 provided...
Running tests with args ["--backtrace", "--format", "Spec::Runner::Formatter::TeamcityFormatter", "--require", "teamcity/spec/runner/formatter/teamcity/formatter", "C:/Users/felippe/Google Drive/RubymineProjects/Demo/spec/controllers/pages_controller_spec.rb"]...
  <-- take tuple(1);
   -- (1);run done

Comment actions Permalink


I've investigated this a little bit deeper and it looks like a bug in rspec for me.  For some reasons its exit code is 1 when it uses Spork.
So, I've filed about this issue.

Regards, Oleg.


Please sign in to leave a comment.