Skip to content

Commit 76a108b

Browse files
committed
Extract constant.
1 parent 61150ea commit 76a108b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/xspec/notifiers.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ def run_finish
199199

200200
private
201201

202+
LIB_DIR = File.expand_path('../..', __FILE__)
203+
202204
# A standard backtrace contains many entries for XSpec itself which are
203205
# not useful for debugging your tests, so they are stripped out.
204206
def clean_backtrace(backtrace)
205-
lib_dir = File.dirname(File.expand_path('..', __FILE__))
206-
207207
backtrace.reject {|x|
208-
File.dirname(x).start_with?(lib_dir)
208+
File.dirname(x).start_with?(LIB_DIR)
209209
}
210210
end
211211

0 commit comments

Comments
 (0)