Method: MSpecScript#load_default
- Defined in:
- lib/extensions/mspec/mspec/utils/script.rb
#load_default ⇒ Object
Attempts to load a default config file. First tries to load ‘default.mspec’. If that fails, attempts to load a config file name constructed from the value of RUBY_ENGINE and the first two numbers in RUBY_VERSION. For example, on MRI 1.8.6, the file name would be ‘ruby.1.8.mspec’.
97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/extensions/mspec/mspec/utils/script.rb', line 97 def load_default try_load 'default.mspec' if Object.const_defined?(:RUBY_ENGINE) engine = RUBY_ENGINE else engine = 'ruby' end try_load "#{engine}.#{SpecGuard.ruby_version}.mspec" try_load "#{engine}.mspec" end |