Module: RSpecAtoms::ExampleId
- Defined in:
- lib/rspec_atoms/example_id.rb
Constant Summary collapse
- SELECTOR_PATTERN =
/\[[^\]]+\]\z/
Class Method Summary collapse
Class Method Details
.file_path(value) ⇒ Object
13 14 15 |
# File 'lib/rspec_atoms/example_id.rb', line 13 def file_path(value) normalize(value).sub(SELECTOR_PATTERN, "") end |
.normalize(value) ⇒ Object
9 10 11 |
# File 'lib/rspec_atoms/example_id.rb', line 9 def normalize(value) value.to_s.sub(/\A\.\//, "") end |