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 5
5
require 'geo_pattern/version'
6
6
require 'geo_pattern/svg'
7
7
require 'geo_pattern/pattern_helpers'
8
+ require 'geo_pattern/helpers'
8
9
9
10
require 'geo_pattern/pattern/base_pattern'
10
11
require '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 11
11
12
12
require 'geo_pattern'
13
13
14
+ # Make some helpers available
15
+ include GeoPattern ::Helpers
16
+
14
17
# 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__ )
17
21
18
22
# No need to add the namespace to every class tested
19
23
include GeoPattern
You can’t perform that action at this time.
0 commit comments