Class: Tester::Table
- Inherits:
-
Object
- Object
- Tester::Table
- Defined in:
- lib/tester/table.rb
Class Method Summary collapse
Class Method Details
.[](test_file, name) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/tester/table.rb', line 3 def self.[] test_file, name parse_format = Tester::Configuration.config['table_format'] || 'plain_text' table_file = test_file.sub(/_spec\.rb$/,'').sub(/^#{Tester::Configuration.root}\/features\//,'') ## constantize: plain_text => PlainText parse_format = parse_format.capitalize.gsub(/_(\w)/) { $1.capitalize } return Tester::Parse.const_get(parse_format)[table_file, name.strip] end |