Module: Marso::FeatureLoad
- Included in:
- Feature
- Defined in:
- lib/marso/domain/feature/feature_load.rb
Instance Method Summary collapse
-
#load(mode) ⇒ Object
Load feature’s components based on the following mode: => :none => :stories => :stories_with_scenarios => :scenario_contexts => :all.
Instance Method Details
#load(mode) ⇒ Object
Load feature’s components based on the following mode:
> :none
> :stories
> :stories_with_scenarios
> :scenario_contexts
> :all
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/marso/domain/feature/feature_load.rb', line 12 def load(mode) case mode when :none return self when :stories return load_stories when :stories_with_scenarios return load_stories :with_scenarios when :scenario_contexts return load_scenario_contexts when :all return self.load(:stories_with_scenarios).load(:scenario_contexts) else raise ArgumentError, "Mode #{mode} is not supported. Use one of the following: :stories, :scenario_contexts, :all" end end |