File tree Expand file tree Collapse file tree 14 files changed +44
-15
lines changed Expand file tree Collapse file tree 14 files changed +44
-15
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ class Spec
4848 attr_reader :tests
4949
5050 def initialize ( test_path )
51- @spec = YAML . load ( File . read ( test_path ) )
51+ @spec = :: Utils . load_spec_yaml_file ( test_path )
5252 @description = File . basename ( test_path )
5353 end
5454
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class Spec
3232 #
3333 # @since 2.6.0
3434 def initialize ( test_path )
35- @spec = YAML . load ( File . read ( test_path ) )
35+ @spec = :: Utils . load_spec_yaml_file ( test_path )
3636 @description = File . basename ( test_path )
3737 @spec_tests = @spec [ 'tests' ]
3838 @collection_name = @spec [ 'collection_name' ]
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class Spec
4040 #
4141 # @param [ String ] test_path The path to the file.
4242 def initialize ( test_path )
43- @test = YAML . load ( File . read ( test_path ) )
43+ @test = :: Utils . load_spec_yaml_file ( test_path )
4444
4545 @description = @test [ 'description' ]
4646 @pool_options = ::Utils . snakeize_hash ( process_options ( @test [ 'poolOptions' ] ) )
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class Spec
204204 #
205205 # @since 2.1.0
206206 def initialize ( test_path )
207- @spec = YAML . load ( File . read ( test_path ) )
207+ @spec = :: Utils . load_spec_yaml_file ( test_path )
208208 @data = @spec [ 'data' ]
209209 @tests = @spec [ 'tests' ]
210210 end
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class Spec
100100 #
101101 # @since 2.0.0
102102 def initialize ( test_path )
103- @spec = YAML . load ( File . read ( test_path ) )
103+ @spec = :: Utils . load_spec_yaml_file ( test_path )
104104 @description = File . basename ( test_path )
105105 end
106106
Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ class Spec
1212 #
1313 # @since 2.0.0
1414 def initialize ( test_path )
15- contents = File . read ( test_path )
16-
17- @spec = YAML . load ( contents )
15+ @spec = ::Utils . load_spec_yaml_file ( test_path )
1816 @description = File . basename ( test_path )
1917 @data = BSON ::ExtJSON . parse_obj ( @spec [ 'data' ] )
2018 @tests = @spec [ 'tests' ]
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class Spec
100100 #
101101 # @since 2.1.0
102102 def initialize ( test_path )
103- @spec = YAML . load ( File . read ( test_path ) )
103+ @spec = :: Utils . load_spec_yaml_file ( test_path )
104104 @description = File . basename ( test_path )
105105 @data = @spec [ 'data' ]
106106 end
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class Spec
1313 #
1414 # @since 2.0.0
1515 def initialize ( test_path )
16- @spec = YAML . load ( File . read ( test_path ) )
16+ @spec = :: Utils . load_spec_yaml_file ( test_path )
1717 @description = File . basename ( test_path )
1818 end
1919
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class Spec
7777 #
7878 # @since 2.0.0
7979 def initialize ( test_path )
80- @test = YAML . load ( File . read ( test_path ) )
80+ @test = :: Utils . load_spec_yaml_file ( test_path )
8181 @description = @test [ 'description' ]
8282 @uri_string = @test [ 'uri' ]
8383 @uri = URI . new ( uri_string )
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class Spec
6464 #
6565 # @since 2.0.0
6666 def initialize ( test_path )
67- @test = YAML . load ( File . read ( test_path ) )
67+ @test = :: Utils . load_spec_yaml_file ( test_path )
6868 @description = "#{ @test [ 'topology_description' ] [ 'type' ] } : #{ File . basename ( test_path ) } "
6969 @heartbeat_frequency = @test [ 'heartbeatFrequencyMS' ] / 1000 if @test [ 'heartbeatFrequencyMS' ]
7070 @read_preference = @test [ 'read_preference' ]
You can’t perform that action at this time.
0 commit comments