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