Class: Pione::TestHelper::PioneClientRunner
- Inherits:
-
StructX
- Object
- StructX
- Pione::TestHelper::PioneClientRunner
- Defined in:
- lib/pione/test-helper/command-helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.test(context, &b) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/pione/test-helper/command-helper.rb', line 11 def self.test(context, &b) # with client mode new(context: context).tap do |runner| runner.default_arguments = ["--base", runner.base.path.to_s] b.call(runner) end end |
Instance Method Details
#fail ⇒ Object
28 29 30 31 32 33 |
# File 'lib/pione/test-helper/command-helper.rb', line 28 def fail _args = args context.it(template % title) do Rootage::ScenarioTest.fail(Pione::Command::PioneClient, _args) end end |
#run(&b) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/pione/test-helper/command-helper.rb', line 19 def run(&b) _args = args _base = base context.it(template % title) do Rootage::ScenarioTest.succeed(Pione::Command::PioneClient, _args) b.call(_base) end end |
#timeout(sec) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/pione/test-helper/command-helper.rb', line 35 def timeout(sec) _args = args + ["--timeout", sec.to_s] context.it(template % title) do Rootage::ScenarioTest.fail(Pione::Command::PioneClient, _args) end end |