Class: Cucumber::Core::Test::Case::NameBuilder
- Inherits:
-
Object
- Object
- Cucumber::Core::Test::Case::NameBuilder
- Defined in:
- lib/cucumber/core/test/case.rb
Instance Attribute Summary collapse
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #examples_table(table) ⇒ Object
- #examples_table_row(row) ⇒ Object
- #feature ⇒ Object
-
#initialize(test_case) ⇒ NameBuilder
constructor
A new instance of NameBuilder.
- #scenario(scenario) ⇒ Object
- #scenario_outline(outline) ⇒ Object
Constructor Details
#initialize(test_case) ⇒ NameBuilder
Returns a new instance of NameBuilder.
101 102 103 |
# File 'lib/cucumber/core/test/case.rb', line 101 def initialize(test_case) test_case.describe_source_to self end |
Instance Attribute Details
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
99 100 101 |
# File 'lib/cucumber/core/test/case.rb', line 99 def keyword @keyword end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
98 99 100 |
# File 'lib/cucumber/core/test/case.rb', line 98 def result @result end |
Instance Method Details
#examples_table(table) ⇒ Object
121 122 123 124 125 126 |
# File 'lib/cucumber/core/test/case.rb', line 121 def examples_table(table) name = table.name.strip name = table.keyword if name.length == 0 @result = ", #{name}" + @result self end |
#examples_table_row(row) ⇒ Object
128 129 130 131 |
# File 'lib/cucumber/core/test/case.rb', line 128 def examples_table_row(row) @result = " (row #{row.number})" self end |
#feature ⇒ Object
105 106 107 |
# File 'lib/cucumber/core/test/case.rb', line 105 def feature(*) self end |
#scenario(scenario) ⇒ Object
109 110 111 112 113 |
# File 'lib/cucumber/core/test/case.rb', line 109 def scenario(scenario) @result = scenario.name @keyword = scenario.keyword self end |
#scenario_outline(outline) ⇒ Object
115 116 117 118 119 |
# File 'lib/cucumber/core/test/case.rb', line 115 def scenario_outline(outline) @result = outline.name + @result @keyword = outline.keyword self end |