Class Spec::Story::StepMother
In: lib/spec/story/step_mother.rb
Parent: Object

Methods

clear   empty?   find   new   store   use  

Public Class methods

[Source]

   # File lib/spec/story/step_mother.rb, line 4
4:       def initialize
5:         @steps = StepGroup.new
6:       end

Public Instance methods

[Source]

    # File lib/spec/story/step_mother.rb, line 27
27:       def clear
28:         @steps.clear
29:       end

[Source]

    # File lib/spec/story/step_mother.rb, line 31
31:       def empty?
32:         @steps.empty?
33:       end

[Source]

    # File lib/spec/story/step_mother.rb, line 16
16:       def find(type, name)
17:         if @steps.find(type, name).nil?
18:           @steps.add(type,
19:           Step.new(name) do
20:             raise Spec::Example::ExamplePendingError.new("Unimplemented step: #{name}")
21:           end
22:           )
23:         end
24:         @steps.find(type, name)
25:       end

[Source]

    # File lib/spec/story/step_mother.rb, line 12
12:       def store(type, step)
13:         @steps.add(type, step)
14:       end

[Source]

    # File lib/spec/story/step_mother.rb, line 8
 8:       def use(new_step_group)
 9:         @steps << new_step_group
10:       end

[Validate]