Sha256: f6df84a62e817370aee8a0e46875bbcef06c4a7499e90c13660b6108658912b6
Contents?: true
Size: 626 Bytes
Versions: 33
Compression:
Stored size: 626 Bytes
Contents
describe 'Kernel.require_tree' do it 'loads all the files in a directory' do $ScratchPad = [] require_tree '../fixtures/require_tree_files' $ScratchPad.sort.should == ['file 1.rb', 'file 2.rb', 'file 3.rb', 'file 4.rb', 'file 5.rb', 'nested 1.rb', 'nested 2.rb', 'other 1.rb'] end it 'can be used with "."' do $ScratchPad = [] require_relative '../fixtures/require_tree_with_dot/index' $ScratchPad[0].should == 'index.rb-pre' $ScratchPad[1...-1].sort.should == ['file 1.rb', 'file 2.rb', 'file 3.rb'] $ScratchPad[-1].should == 'index.rb-post' end end
Version data entries
33 entries across 33 versions & 1 rubygems