plsql-spec|rspec is hiding critical errors

113 views
Skip to first unread message

Diego Alvarez Zuluaga

unread,
Dec 13, 2012, 5:40:36 PM12/13/12
to oracle-...@googlegroups.com
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

Diego Alvarez Zuluaga

unread,
Jan 23, 2013, 10:35:49 AM1/23/13
to oracle-...@googlegroups.com
any one? :/

Diego Alvarez Zuluaga

unread,
Apr 22, 2013, 2:57:34 PM4/22/13
to oracle-...@googlegroups.com

Hi

I proposed this commit
https://github.com/d1egoaz/ruby-plsql-spec/commit/5287135e6780ed2b70d8b81e5de6fe5a9f73f126

In the following pull request

What do you think?
Please add your comments to the pull request

Raimonds Simanovskis

unread,
Apr 23, 2013, 3:00:42 PM4/23/13
to oracle-...@googlegroups.com
Thanks for your pull request, merged it in master branch :)

Raimonds
Reply all
Reply to author
Forward
0 new messages