Module: RSpec::Support::OS Private

Defined in:
lib/rspec/support/ruby_features.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Provides query methods for different OS or OS features.

Class Method Summary collapse

Class Method Details

.windows?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


12
13
14
# File 'lib/rspec/support/ruby_features.rb', line 12

def windows?
  !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
end

.windows_file_path?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


16
17
18
# File 'lib/rspec/support/ruby_features.rb', line 16

def windows_file_path?
  ::File::ALT_SEPARATOR == '\\'
end