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)


14
15
16
# File 'lib/rspec/support/ruby_features.rb', line 14

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)


18
19
20
# File 'lib/rspec/support/ruby_features.rb', line 18

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