Class: ApprovalTests::Namers::RSpecNamer
- Inherits:
-
Object
- Object
- ApprovalTests::Namers::RSpecNamer
- Defined in:
- lib/approval_tests/namers/rspec_namer.rb
Instance Method Summary collapse
- #approval_name ⇒ Object
- #approval_name=(name) ⇒ Object
- #source_file_path ⇒ Object
- #source_file_path=(path) ⇒ Object
Instance Method Details
#approval_name ⇒ Object
5 6 7 |
# File 'lib/approval_tests/namers/rspec_namer.rb', line 5 def approval_name @approval_name end |
#approval_name=(name) ⇒ Object
9 10 11 |
# File 'lib/approval_tests/namers/rspec_namer.rb', line 9 def approval_name=(name) @approval_name = name.downcase.gsub(/ |\./, "_") end |
#source_file_path ⇒ Object
13 14 15 |
# File 'lib/approval_tests/namers/rspec_namer.rb', line 13 def source_file_path @source_file_path ||= File.dirname(File.(@approval_name)) end |
#source_file_path=(path) ⇒ Object
17 18 19 |
# File 'lib/approval_tests/namers/rspec_namer.rb', line 17 def source_file_path=(path) @source_file_path = path end |