File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def run
6666
6767 # @rbs return: Hash[String, untyped]?
6868 def json_data
69- File . open ( filepath ) { |f | JSON . parse ( f ) }
69+ File . open ( filepath ) { |f | JSON . parse ( f . read ) }
7070 end
7171
7272 # @rbs return: Hash[String, untyped]?
@@ -99,7 +99,10 @@ def sort_value(value)
9999
100100 # @rbs return: bool
101101 def test_env?
102- caller ( 0 ..0 ) . first . split ( '/' ) . last . include? ( 'minitest.rb' )
102+ runner = caller ( 0 ..0 )
103+ return false if runner . nil?
104+
105+ runner . first . split ( '/' ) . last . include? ( 'minitest.rb' )
103106 end
104107
105108 # @rbs message: String
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def test_sort_json_data_with_invalid_data_type_of_order
6363 attr_reader :dirname , :filename , :filepath
6464
6565 def actual_json
66- File . open ( filepath ) { |f | JSON . parse ( f ) . deep_symbolize_keys }
66+ File . open ( filepath ) { |f | JSON . parse ( f . read ) . deep_symbolize_keys }
6767 end
6868
6969 def json_data
You can’t perform that action at this time.
0 commit comments