Commit 14238ee2 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix bootable scenario arguments for OptionParser

parent 304ceb14
...@@ -11,6 +11,8 @@ module QA ...@@ -11,6 +11,8 @@ module QA
module ClassMethods module ClassMethods
def launch!(argv) def launch!(argv)
return self.perform(*argv) unless has_attributes?
arguments = OptionParser.new do |parser| arguments = OptionParser.new do |parser|
options.to_a.each do |opt| options.to_a.each do |opt|
parser.on(opt.arg, opt.desc) do |value| parser.on(opt.arg, opt.desc) do |value|
...@@ -21,11 +23,7 @@ module QA ...@@ -21,11 +23,7 @@ module QA
arguments.parse!(argv) arguments.parse!(argv)
if has_attributes?
self.perform(**Runtime::Scenario.attributes) self.perform(**Runtime::Scenario.attributes)
else
self.perform(*argv)
end
end end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment