Module: CoreEx::Pathname::Assertions
- Defined in:
- lib/core_ex/pathname.rb
Overview
module ClassMethods
Instance Method Summary collapse
Instance Method Details
#assert_expand_path_with(inp, ref, load_path = (@load_path || $LOAD_PATH)) ⇒ Object
202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/core_ex/pathname.rb', line 202 def ( inp, ref, load_path=(@load_path || $LOAD_PATH) ) assert_nothing_raised do @my = inp.(load_path, %w[ .rb .so .bundle .o .dll ] << '') ref = ref..cleanpath unless ref.nil? assert_equal(ref, @my, inp) end unless ref.nil? assert_kind_of(Pathname, @my) assert(@my.exist?) end end |