Class: ApprovalTests::Namers::RSpecNamer

Inherits:
Object
  • Object
show all
Defined in:
lib/approval_tests/namers/rspec_namer.rb

Instance Method Summary collapse

Instance Method Details

#approval_nameObject



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_pathObject



13
14
15
# File 'lib/approval_tests/namers/rspec_namer.rb', line 13

def source_file_path
  @source_file_path ||= File.dirname(File.expand_path(@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