123456789_123456789_123456789_123456789_123456789_

Module: RBS::Test::SetupHelper

Relationships & Source Files
Namespace Children
Exceptions:
Defined in: lib/rbs/test/setup_helper.rb

Constant Summary

Instance Method Summary

Instance Method Details

#get_sample_size(string)

[ GitHub ]

  
# File 'lib/rbs/test/setup_helper.rb', line 15

def get_sample_size(string)
  case string
  when ""
    DEFAULT_SAMPLE_SIZE
  when 'ALL'
    nil
  else
    int_size = string.to_i
    raise InvalidSampleSizeError.new(string) unless int_size.positive?
    int_size
  end
end

#to_double_class(double_suite)

[ GitHub ]

  
# File 'lib/rbs/test/setup_helper.rb', line 28

def to_double_class(double_suite)
  return nil unless double_suite

  case double_suite.downcase.strip
  when 'rspec'
    ['::RSpec::Mocks::Double']
  when 'minitest'
    ['::Minitest::Mock']
  else
    RBS.logger.warn "Unknown test suite - defaults to nil"
    nil
  end
end