Module: Spinach::DSL::ClassMethods
- Defined in:
- lib/spinach/dsl.rb
Overview
Class methods to extend the host class.
Instance Attribute Summary collapse
-
#feature_name ⇒ Object
readonly
The feature name.
Instance Method Summary collapse
-
#feature(name) ⇒ Object
Sets the feature name.
-
#step(step, &block) ⇒ Object
(also: #Given, #When, #Then, #And, #But)
Defines an action to perform given a particular step literal.
Instance Attribute Details
#feature_name ⇒ Object (readonly)
The feature name.
21 22 23 |
# File 'lib/spinach/dsl.rb', line 21 def feature_name @feature_name end |
Instance Method Details
#feature(name) ⇒ Object
Sets the feature name.
73 74 75 |
# File 'lib/spinach/dsl.rb', line 73 def feature(name) @feature_name = name end |
#step(step, &block) ⇒ Object Also known as: Given, When, Then, And, But
Defines an action to perform given a particular step literal.
52 53 54 |
# File 'lib/spinach/dsl.rb', line 52 def step(step, &block) define_method(Spinach::Support.underscore(step), &block) end |