def create_test_command
  command :test do |c|
    c.syntax = 'test [options] <file>'
    c.description = 'test description'
    c.example 'description', 'command'
    c.example 'description 2', 'command 2'
    c.option '-v', '--verbose', 'verbose description'
    c.when_called do |args, _options|
      format('test %s', args.join)
    end
  end
  @command = command :test
end
Create test command for usage within several specs