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.
-
#Given(step, &block) ⇒ Object
(also: #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.
58 59 60 |
# File 'lib/spinach/dsl.rb', line 58 def feature(name) @feature_name = name end |
#Given(step, &block) ⇒ Object Also known as: When, Then, And, But
Defines an action to perform given a particular step literal.
38 39 40 |
# File 'lib/spinach/dsl.rb', line 38 def Given(step, &block) define_method(Spinach::Support.underscore(step), &block) end |