method
spec_name_for
1.1.4 -
Show latest stable
-
0 notes -
Class: Spec::Runner::SpecParser
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0 (0)
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
spec_name_for(file, line_number)
public
Hide source
# File lib/spec/runner/spec_parser.rb, line 11 def spec_name_for(file, line_number) best_match.clear file = File.expand_path(file) rspec_options.example_groups.each do |example_group| consider_example_groups_for_best_match example_group, file, line_number example_group.examples.each do |example| consider_example_for_best_match example, example_group, file, line_number end end if best_match[:example_group] if best_match[:example] "#{best_match[:example_group].description} #{best_match[:example].description}" else best_match[:example_group].description end else nil end end