18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/rutabaga/util.rb', line 18
def find_feature(description)
tried = []
if description =~ /.*\.(feature|rutabaga)\Z/
return description if File.exists?(description)
tried << description
candidate = File.join(, description)
return candidate if File.exists?(candidate)
tried << candidate
else
feature_files =
feature_files.each do |feature_file|
return feature_file if File.exists?(feature_file)
end
tried += feature_files
end
raise "Feature file not found. Tried: #{tried.join(', ')}"
end
|