Hi
How can I tell plsql to show me all errors generated in the test, that have nothing to do with rspec blocks? (because the errors are generated before those blocks are executed)
For example: (I'm using jruby 1.7.1, jdk 1.7)
If in a _spec.rb i have an error in the required section:
require 'Java' # the correct form is require 'java'
After executing the test, this is the output:
C:\Temp\test>plsql-spec run
Running all specs from spec/
Failing tests!
I try to configure logger option in RSpec.configure with no luck
config.logger = Logger.new(STDERR)
I try to configure a custom formatter in RSpec.configure, but the code is not even executed, because the error is before the tests are executed.
After searching in ruby-plsql-spec code
..\jruby-1.7.1\lib\ruby\gems\shared\gems\ruby-plsql-spec-0.3.0\lib\plsql\spec
line 77-83
i found that within the call to the run method, the option :capture has the value true; as you can see on the code below
if files.empty?
say "Running all specs from spec/", :yellow
puts run("#{speccommand} spec", :verbose => false, :capture => true)
else
say "Running specs from #{files.join(', ')}", :yellow
puts run("#{speccommand} #{files.join(' ')}", :verbose => false, :capture => true)
end
if I change :capture => false, this is the output after executing plsql.spec run
C:\Temp\test>plsql-spec run
Running all specs from spec/
LoadError: no such file to load -- Java
require at org/jruby/RubyKernel.java:1027
require at C:/ruby/jruby-1.7.1/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at C:/Temp/test/spec/test_spec.rb:2
load at org/jruby/RubyKernel.java:1046
(root) at C:/ruby/jruby-1.7.1/lib/ruby/gems/shared/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:1
map at org/jruby/RubyArray.java:2360
load_spec_files at C:/ruby/jruby-1.7.1/lib/ruby/gems/shared/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780
load_spec_files at C:/ruby/jruby-1.7.1/lib/ruby/gems/shared/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780
run at C:/ruby/jruby-1.7.1/lib/ruby/gems/shared/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22
run at C:/ruby/jruby-1.7.1/lib/ruby/gems/shared/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69
false
Failing tests!
How can i get the same result without modifyng ruby-plsql-spec gem?
thanks in advance