This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1346,7 +1346,7 @@ def load_spec_files
1346
1346
# isn't loaded by us here so we only know about it because
1347
1347
# of an example group being registered in it.
1348
1348
RSpec . world . registered_example_group_files . each do |f |
1349
- loaded_spec_files << File . expand_path ( f )
1349
+ loaded_spec_files << f # the registered files are already expended absolute paths
1350
1350
end
1351
1351
1352
1352
files_to_run . uniq . each do |f |
Original file line number Diff line number Diff line change @@ -147,12 +147,13 @@ def populate_location_attributes
147
147
end
148
148
149
149
relative_file_path = Metadata . relative_path ( file_path )
150
+ absolute_file_path = File . expand_path ( relative_file_path )
150
151
metadata [ :file_path ] = relative_file_path
151
152
metadata [ :line_number ] = line_number . to_i
152
153
metadata [ :location ] = "#{ relative_file_path } :#{ line_number } "
153
- metadata [ :absolute_file_path ] = File . expand_path ( relative_file_path )
154
+ metadata [ :absolute_file_path ] = absolute_file_path
154
155
metadata [ :rerun_file_path ] ||= relative_file_path
155
- metadata [ :scoped_id ] = build_scoped_id_for ( relative_file_path )
156
+ metadata [ :scoped_id ] = build_scoped_id_for ( absolute_file_path )
156
157
end
157
158
158
159
def file_path_and_line_number_from ( backtrace )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def registered_example_group_files
50
50
# Register an example group.
51
51
def register ( example_group )
52
52
example_groups << example_group
53
- @example_group_counts_by_spec_file [ example_group . metadata [ :file_path ] ] += 1
53
+ @example_group_counts_by_spec_file [ example_group . metadata [ :absolute_file_path ] ] += 1
54
54
example_group
55
55
end
56
56
You can’t perform that action at this time.
0 commit comments