Sha256: 9b8a02e14a60c59662b6fafd42dd5dc8860f45a150754c6d65885af7e0727f32

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

require 'base_test'

module ExecutionStrategy
  class TestBase < BaseTest
    include OptparsePlus::ExecutionStrategy

    [
      [:run_command,["ls"]],
      [:exception_meaning_command_not_found,[]],
    ].each do |(method,args)|
      test_that "#{method} isn't implemented" do
        Given {
          @strategy = Base.new
        }
        When {
          @code = lambda { @strategy.send(method,*args) }
        }
        Then {
          assert_raises(RuntimeError,&@code)
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
optparse-plus-3.0.1 test/unit/execution_strategy/test_base.rb
optparse-plus-3.0.0 test/unit/execution_strategy/test_base.rb