File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 55require 'geo_pattern/version'
66require 'geo_pattern/svg'
77require 'geo_pattern/pattern_helpers'
8+ require 'geo_pattern/helpers'
89
910require 'geo_pattern/pattern/base_pattern'
1011require 'geo_pattern/pattern/chevron_pattern'
Original file line number Diff line number Diff line change 1+ module GeoPattern
2+ module Helpers
3+ def require_files_matching_pattern ( pattern )
4+ Dir . glob ( pattern ) . each { |f | require_relative f }
5+ end
6+ end
7+ end
Original file line number Diff line number Diff line change 1111
1212require 'geo_pattern'
1313
14+ # Make some helpers available
15+ include GeoPattern ::Helpers
16+
1417# Loading support files
15- Dir . glob ( ::File . expand_path ( '../support/*.rb' , __FILE__ ) ) . each { |f | require_relative f }
16- Dir . glob ( ::File . expand_path ( '../shared_examples/*.rb' , __FILE__ ) ) . each { |f | require_relative f }
18+ #::File.expand_path('../support/*.rb', __FILE__)
19+ require_files_matching_pattern ::File . expand_path ( '../support/*.rb' , __FILE__ )
20+ require_files_matching_pattern ::File . expand_path ( '../shared_examples/*.rb' , __FILE__ )
1721
1822# No need to add the namespace to every class tested
1923include GeoPattern
You can’t perform that action at this time.
0 commit comments