Skip to content

Commit 7b0027d

Browse files
committed
Merge pull request #10 from d1egoaz/master
New option to plsql-spec command to indicate when to capture the output
2 parents 5273ad9 + 5287135 commit 7b0027d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/plsql/spec/cli.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def init
4242
:type => :boolean,
4343
:default => false,
4444
:banner => "show DBMS_OUTPUT messages"
45+
method_option :capture,
46+
:type => :boolean,
47+
:default => true,
48+
:banner => "hide the output when some exception occur"
4549
method_option :"html",
4650
:type => :string,
4751
:banner => "generate HTML RSpec output to specified file (default is test-results.html)"
@@ -76,10 +80,10 @@ def run_tests(*files)
7680

7781
if files.empty?
7882
say "Running all specs from spec/", :yellow
79-
puts run("#{speccommand} spec", :verbose => false, :capture => true)
83+
puts run("#{speccommand} spec", :verbose => false, :capture => options[:capture])
8084
else
8185
say "Running specs from #{files.join(', ')}", :yellow
82-
puts run("#{speccommand} #{files.join(' ')}", :verbose => false, :capture => true)
86+
puts run("#{speccommand} #{files.join(' ')}", :verbose => false, :capture => options[:capture])
8387
end
8488

8589
if options[:html]

0 commit comments

Comments
 (0)